# efcFIle
通用的文件储存类 支持本地、S3、OSS、Qiniu
```
pip install efcFile
```
```python
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=""))
```
Raw data
{
"_id": null,
"home_page": "https://github.com/duolabmeng6/efcFile",
"name": "efcFile",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "efcFile",
"author": "duolabmeng6",
"author_email": "1715109585@qq.com",
"download_url": "https://files.pythonhosted.org/packages/4d/e0/ff98f6ee09e803796378dcddf646f42651e46b81ba0a2a091fe92919952c/efcfile-1.0.4.tar.gz",
"platform": null,
"description": "# efcFIle\n\n\u901a\u7528\u7684\u6587\u4ef6\u50a8\u5b58\u7c7b \u652f\u6301\u672c\u5730\u3001S3\u3001OSS\u3001Qiniu\n\n```\npip install efcFile\n```\n\n```python\n\nimport efcFile\nmanager = efcFile.FileStorageManager(default_storage=\"local\")\nmanager.set_storage(\"local\", efcFile.LocalFileStorage(storage_path=\"./storage/\"))\nmanager.put(\"example.txt\", b\"This is a test file\")\nprint(manager.get(\"example.txt\"))\nprint(manager.exists(\"example.txt\"))\nprint(manager.size(\"example.txt\"))\nprint(manager.mime_type(\"example.txt\"))\nprint(manager.list(\"\"))\nmanager.move(\"example.txt\", \"example_moved.txt\")\nprint(manager.exists(\"example_moved.txt\"))\nmanager.delete(\"example_moved.txt\")\n\nmanager.set_storage(\"s3\", efcFile.S3FileStorage(access_key=\"\", secret_key=\"\", endpoint_url=\"\", region_name=\"auto\", bucket_name=\"\"))\n\nmanager.set_storage(\"oss\", efcFile.OSSFileStorage(access_key=\"\", secret_key=\"\", endpoint=\"\", bucket_name=\"\", path_prefix=\"\"))\n\nmanager.set_storage(\"qiniu\", efcFile.QiniuFileStorage(access_key=\"\", secret_key=\"\", bucket_name=\"\", domain=\"\", path_prefix=\"\"))\n\n```\n\n",
"bugtrack_url": null,
"license": null,
"summary": "A file storage management package supporting various providers like S3, OSS, and Qiniu.",
"version": "1.0.4",
"project_urls": {
"Homepage": "https://github.com/duolabmeng6/efcFile"
},
"split_keywords": [
"efcfile"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "00ec821e9db431358f30c579c1f0d26b9a99d386d9eb8dfa212280043c31720c",
"md5": "368e64727973151b3d4d8da53638079f",
"sha256": "f2c91b49feb526ea7daa364c01bf40e1c7fedd317d741f76c5eb9cad33560abb"
},
"downloads": -1,
"filename": "efcFile-1.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "368e64727973151b3d4d8da53638079f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 7993,
"upload_time": "2024-08-14T17:19:21",
"upload_time_iso_8601": "2024-08-14T17:19:21.234756Z",
"url": "https://files.pythonhosted.org/packages/00/ec/821e9db431358f30c579c1f0d26b9a99d386d9eb8dfa212280043c31720c/efcFile-1.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4de0ff98f6ee09e803796378dcddf646f42651e46b81ba0a2a091fe92919952c",
"md5": "f47b837e1c7408f3dd046f33bcea8746",
"sha256": "fcebf5e856287246fa59e467f1bf5559bdd977a7ae2f290557543b4d09d8097c"
},
"downloads": -1,
"filename": "efcfile-1.0.4.tar.gz",
"has_sig": false,
"md5_digest": "f47b837e1c7408f3dd046f33bcea8746",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 5639,
"upload_time": "2024-08-14T17:19:22",
"upload_time_iso_8601": "2024-08-14T17:19:22.477375Z",
"url": "https://files.pythonhosted.org/packages/4d/e0/ff98f6ee09e803796378dcddf646f42651e46b81ba0a2a091fe92919952c/efcfile-1.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-14 17:19:22",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "duolabmeng6",
"github_project": "efcFile",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "oss2",
"specs": []
},
{
"name": "qiniu",
"specs": []
},
{
"name": "boto3",
"specs": []
},
{
"name": "requests",
"specs": []
}
],
"lcname": "efcfile"
}