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.2.tar.gz
(11.3 kB
view hashes)
Built Distribution
Close
Hashes for python_alist_api-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2686aeb3af95c9240d2946418c35ed8b98d3851ae26fdfda221710ca66787abd |
|
MD5 | 4c9e745d68790f641ec59099faa5a399 |
|
BLAKE2b-256 | f2790977d55fb46e0d67ef642711928eb654d9fda79cdc306083638eb8144866 |