Skip to main content

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.3.tar.gz (13.7 kB view hashes)

Uploaded Source

Built Distribution

python_alist_api-0.0.3-py3-none-any.whl (13.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page