SDK for Cloudreve sites
Project description
Cloudreve SDK
本项目为 Cloudreve 社区版的 Python SDK。
示例
from cloudreve import Cloudreve
# 初始化
conn = Cloudreve('http://127.0.0.1:5212')
# 登录
conn.login('admin@cloudreve.org', '123456')
# 获取文件ID
file_id = conn.get_id('/hello.py')
# 获取文件属性
data = conn.get_property(file_id)
print(data)
# 获取临时下载URL
url = conn.get_download_url(file_id, 'hello_world.py', True)
# 下载文件到本地
conn.download(file_id, 'hello_world.py')
# 创建目录
conn.create_dir('/python')
# 复制文件
conn.copy('/hello.py', '/python')
# 重命名文件
conn.rename(file_id, 'world.py')
# 移动文件
conn.move('/world.py', '/python')
# 上传文件
conn.upload('/my_file_backup.py', 'D:/my_file.py')
联系我们
- Email:yxzlwz@gmail.com
- TG 群:https://t.me/+XW2ok10N8DExMDU1
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
cloudreve-1.0.1.tar.gz
(17.7 kB
view hashes)