Skip to main content

A file storage management package supporting various providers like S3, OSS, and Qiniu.

Project description

efcFIle

通用的文件储存类 支持本地、S3、OSS、Qiniu

pip install efcFile
import efcFile
manager = efcFile.FileStorageManager(default_storage="local")
manager.set_storage("local", efcFile.LocalFileStorage(storage_path="./storage/"))
manager.put("example.txt", b"This is a test file")
print(manager.get("example.txt"))
print(manager.exists("example.txt"))
print(manager.size("example.txt"))
print(manager.mime_type("example.txt"))
print(manager.list(""))
manager.move("example.txt", "example_moved.txt")
print(manager.exists("example_moved.txt"))
manager.delete("example_moved.txt")

manager.set_storage("s3", efcFile.S3FileStorage(access_key="", secret_key="", endpoint_url="", region_name="auto", bucket_name=""))

manager.set_storage("oss", efcFile.OSSFileStorage(access_key="", secret_key="", endpoint="", bucket_name="", path_prefix=""))

manager.set_storage("qiniu", efcFile.QiniuFileStorage(access_key="", secret_key="", bucket_name="", domain="", path_prefix=""))

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

efcfile-1.0.4.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

efcFile-1.0.4-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file efcfile-1.0.4.tar.gz.

File metadata

  • Download URL: efcfile-1.0.4.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for efcfile-1.0.4.tar.gz
Algorithm Hash digest
SHA256 fcebf5e856287246fa59e467f1bf5559bdd977a7ae2f290557543b4d09d8097c
MD5 f47b837e1c7408f3dd046f33bcea8746
BLAKE2b-256 4de0ff98f6ee09e803796378dcddf646f42651e46b81ba0a2a091fe92919952c

See more details on using hashes here.

File details

Details for the file efcFile-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: efcFile-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for efcFile-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f2c91b49feb526ea7daa364c01bf40e1c7fedd317d741f76c5eb9cad33560abb
MD5 368e64727973151b3d4d8da53638079f
BLAKE2b-256 00ec821e9db431358f30c579c1f0d26b9a99d386d9eb8dfa212280043c31720c

See more details on using hashes here.

Supported by

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