Python wrapper for the Alist API
Project description
项目描述
Alist 的 python api。Alist api的说明可以参考API Document。
仅支持Alist v2。
安装
pip install python-alist-api
使用方法
示例1:创建alist客户端
匿名登录,只能使用/public
API。
from alist import AlistClient
client = AlistClient('https://your.alist.domain')
使用密码或授权码登录,能使用/public
和/admin
API。
from alist import AlistClient
client = AlistClient('https://your.alist.domain', password='xxxxx')
# 或者
client = AlistClient('https://your.alist.domain', authorization='xxxxx')
示例2:获取alist版本号
version = client.public.settings.version()
示例3:获取文件列表。
result = client.public.path('/xxxxx')
示例4:打开搜索
需要使用密码或授权码登录客户端。
client.admin.settings.enable_search(True)
示例5:上传文件
需要使用密码或授权码登录客户端,或开启了游客上传。
client.public.upload(['path/to/file1', 'path/to/file2'], '/target/path')
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
python-alist-api-0.0.1.tar.gz
(11.3 kB
view hashes)
Built Distribution
Close
Hashes for python_alist_api-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5abd253f3da918b4a4623b00621cab418fc4b19c982c5cab47fcfa97e50102a |
|
MD5 | 2332f991c867a32ab22a2bda9e65caa4 |
|
BLAKE2b-256 | 40528a8c37fdb439d1965117507a01275911f50b330dcbf2079ea13c1f528608 |