EepyFileServer API Wrapper written in Python
Project description
eepyfileserver-wrapper
make sure you have all the dependencies installed by running pip install -r requirements.txt
docs will be here when i uneep
Examples
Logging in and getting instance info
from eepyfileserverwrapper import EepyFileServer
api = EepyFileServer(base_url="https://example.com", password="password")
print(api.get_instance_info()) # {'instance': {'version': ..., ...}, ...}
Managing directories
print(api.get_tree()) # prints the whole tree with EepyFileServerDirectory objects
print(api.get_tree("/path/somethinghere")) # prints the same as above but only for specified path
# -----
api.add_directory("/new_dir/something") # adds a new directory
api.remove_directory("/new_dir/something") # removes the right most directory
Getting a list of files
print(api.get_filelist()) # [working_path: ["file1.txt", "something.py"], ...]
Getting a file
filepartial = api.get_file("path/to/file1.txt") # returns a partial file
print(filepartial.metadata) # FileMetadata(...)
file = filepartial.fetch_file()
print(file.name) # "file1.txt"
for chunk in file.stream: #4096 byte chunks
print(chunk)
loadedfile = file.load()
print(loadedfile) # returns every single chunk concatenated
file.save("local/path/to/file.txt")
Renaming a file
api.rename_file("path/to/file1.txt", "file6.txt")
Uploading a file
with open("path/to/file3.txt", "rb") as f:
api.upload_file("path/to/file3.txt", f)
Overwriting a file
with open("path/to/file4.txt", "rb") as f:
api.overwrite_file("path/to/file3.txt", f)
Deleting a file
api.delete_file("path/to/file1.txt")
Moving a file
api.move_file("old/path/to/file1.txt", "new/path/to/file1.txt")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
efs_wrapper-1.0.1.tar.gz
(17.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file efs_wrapper-1.0.1.tar.gz.
File metadata
- Download URL: efs_wrapper-1.0.1.tar.gz
- Upload date:
- Size: 17.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13f26f311b3e57afbd595a96a8a89d8d606b3ac07a150ff3455b870b025ea9ee
|
|
| MD5 |
ba3ab276eb41fae8a662aefe9518af2e
|
|
| BLAKE2b-256 |
018b1d5996c2b4dc9651f5a1a4124d7538aa1ab561d5d7353c147dbcad0e7c9b
|
File details
Details for the file efs_wrapper-1.0.1-py3-none-any.whl.
File metadata
- Download URL: efs_wrapper-1.0.1-py3-none-any.whl
- Upload date:
- Size: 17.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8862500cd38f4c034b9c82073fae8635a90f19cb2625e08d43c0fd929d418757
|
|
| MD5 |
ac7682f00c205409fd3c5b1ba226b7b8
|
|
| BLAKE2b-256 |
60e94fdb9a30ed15e60d4833399d88b17ce9990fbfd4fe6886fc1e6aaf4ed9a6
|