jcs-sdk Joint Cloud Storage python sdk
云际网盘 python sdk
Joint Cloud Storage 是一个分布式云际存储系统。多个云服务访问方式统一,实现互操作性。 在此基础上,通过统一定义的接口互相协作,形成云际存储系统。
使用方法:
import os
from JointCloudStorage import *
if __name__ == '__main__':
access_key = "47bed2954a3647fdbc7a3364778c388f"
secret_key = "2d61f1ec5d834af6ad7150d756fa33e5"
auth = Auth(access_key, secret_key)
bucket = Bucket(auth, "http://192.168.105.13:8085")
state = State(auth, "http://192.168.105.13:8085")
info = state.get_server_info()
print("服务器状态:", info)
storage_state = state.get_storage_state()
print("存储使用情况:", storage_state)
storage_plan = state.get_storage_plan()
print("存储方案:", storage_plan)
files = bucket.get_object_list("/") # 获取文件列表
print(files)
with open("../requirements.txt") as file:
bucket.put_object("/python/r.txt", file) # 上传文件
file.seek(0, 0)
task_id = bucket.put_object_async("/python/r2.txt", file) # 异步上传
print("上传 task id:", task_id)
files = bucket.get_object_list("/python/") # 获取以 /python/ 为前缀的文件对象
print(files)
if not os.path.exists("./tmp/"):
os.makedirs("./tmp/")
c = bucket.get_object("/python/r.txt") # 下载文件
with open("./tmp/t.txt", "wb+") as f:
f.write(c)
bucket.delete_object("/python/r.txt") # 删除文件
files = bucket.get_object_list("/python/")
print(files)
Metadata
Release files for jcs-sdk 1.7.25
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jcs-sdk-1.7.25.tar.gz | 4.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jcs_sdk-1.7.25-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.4 kB
Release files / jcs-sdk-1.7.25.tar.gz
| Download URL | jcs-sdk-1.7.25.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6d67672d4103e99686f5752e409b164017a6f55e64852cf530590e2e0da8df41
|
|
BLAKE2b-256 checksum How to use checksums |
71cc60c8cdc6bb09ea1d5f5560ef1cee2aaeecfeb2251544df968cff79b76b02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
|
Release files / jcs_sdk-1.7.25-py3-none-any.whl
| Download URL | jcs_sdk-1.7.25-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6cc3d8e1eefb6dbd04bc23077994b5a3016a9b909e16b93c7933adbb5566d269
|
|
BLAKE2b-256 checksum How to use checksums |
c4fc982a4f3bb0030f12f7ee2ce5ae4845fc0ef7b3ece0213b7e39f8aa1f96f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
|