Metadata-Version: 2.4
Name: fshstorage
Version: 1.0.0.post1
Summary: FshStorage API Wrapper written in Python
Author: maxie
License-Expression: MIT
Project-URL: Homepage, https://codeberg.org/maxeepy/fshstorage-wrapper
Project-URL: Issues, https://codeberg.org/maxeepy/fshstorage-wrapper/issues
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.30
Requires-Dist: fshlink
Dynamic: license-file

# fshstorage

An API wrapper written in python for https://storage.fsh.plus/

## Examples

### Logging in and getting a list of files

```py
from fshstorage import FshStorageWrapper

fsh = FshStorageWrapper("token")
print(fsh.list_files()) # Returns a dictionary of file_name: FshStoragePartailFile's

```

### Downloading a file

```py
file1 = api.download_file("name.png")
print(file1) # Returns a FshStorageFile

# ------

list_of_files = api.files()

file2 = list_of_files["name.png"]
print(list_of_files["name.png"]) # Returns a FshStoragePartialFile

file2 = file2.download()
print(file2) # Returns a FshFile
```

### Sharing a file

```py
file1.share() # Returns a https://link.fsh.plus/... (FshShortenedLink object)
api.share_file("name.png") # Returns a https://link.fsh.plus/... (FshShortenedLink object)
```

### Saving a file

```py
file1.save() # Defaults to the name attribute in file1 (will download to your current working directory)
file2.save("name.png") # Saves the file to the specified path/name 
```

### Deleting a file

```py
api.delete_file("name.png")
```

### Renaming a file

```py
api.rename_file("name.png", "waaaaaa.png")
```
