Skip to main content

EepyFileServer API Wrapper written in Python

Project description

efs-wrapper (formerly eepyfileserver-wrapper)

docs will be here when i uneep

Examples

Logging in and getting instance info

from efs_wrapper import EepyFileServer
# or from efs_wrapper.v1 import EepFileServer

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: # 2 megabyte 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


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.2.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

efs_wrapper-1.0.2-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file efs_wrapper-1.0.2.tar.gz.

File metadata

  • Download URL: efs_wrapper-1.0.2.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for efs_wrapper-1.0.2.tar.gz
Algorithm Hash digest
SHA256 4978e4bd4844efff23c168851f4949d41e342846d898329512fd6c9f840c5c81
MD5 45f674820a4d5e6b95c5e67228562b6d
BLAKE2b-256 20e1f6d44707a8aca06aa026362e0d7866d119378ff72159b4b7c8b0997f2779

See more details on using hashes here.

File details

Details for the file efs_wrapper-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: efs_wrapper-1.0.2-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

Hashes for efs_wrapper-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 675d4550c0d35f5d6c8839ecf958492c1daf3425e2c3094f4c0ef52ef10b739b
MD5 4ae04df7f367cd3685d40277171cbd4f
BLAKE2b-256 3dc1d012648a7bda03edb6677ca1498d9dcdcd0880fc7f585029b2e770dde83d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page