fundrive-alipan
阿里云盘(AliOpenDrive)开放平台 Python SDK,封装扫码登录、文件列表/搜索、上传下载、 移动复制、回收站与分享链接等常用能力,供 fundrive 及其他项目以统一接口接入阿里云盘。
安装
pip install fundrive-alipan
# 或
uv add fundrive-alipan
快速开始
先在阿里云盘开放平台创建应用,获取 client_id、client_secret,随后扫码登录并列出
根目录文件:
from fundrives.aliopen import AliOpenManage
manage = AliOpenManage()
# client_id / client_secret / refresh_token 未提供时,会尝试从 funsecret 配置读取;
# refresh_token 缺失时会走终端二维码扫码登录流程。
manage.login(client_id="your-client-id", client_secret="your-client-secret")
# 列出网盘根目录文件
result = manage.get_file_list(parent_file_id="root")
for item in result.get("items", []):
print(item["name"], item["file_id"])
主要能力
- 二维码扫码登录、access_token 获取与刷新
- 文件列表、搜索、收藏列表
- 文件详情、按路径查找、下载
- 分片上传(带进度条)
- 移动、复制、放入回收站、删除
- 创建分享链接
凭据配置
不建议在代码中硬编码 client_id/client_secret/refresh_token,推荐通过
funsecret 配置:
from funsecret import write_secret
write_secret("your-client-id", "fundrive", "drives", "aliopen", "client_id")
write_secret("your-client-secret", "fundrive", "drives", "aliopen", "client_secret")
write_secret("your-refresh-token", "fundrive", "drives", "aliopen", "refresh_token")
配置完成后 manage.login() 可以不传任何参数。
关于 farfarfun-drive
farfarfun 的网盘 / 云存储产品线:以
fundrive 的统一 BaseDrive 接口为核心,
配套各网盘的独立驱动包与蓝奏云 SDK / 桌面客户端。
- 🏠 组织主页:https://github.com/farfarfun-drive
- 📦 PyPI:https://pypi.org/user/niuliangtao/
- 📧 联系:farfarfun@qq.com
本项目基于 MIT 协议开源。
Metadata
Release files for fundrive-alipan 2.0.101
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fundrive_alipan-2.0.101-py3-none-any.whl | Python 3 | none | any | Details for fundrive_alipan-2.0.101-py3-none-any.whl |
Release files / fundrive_alipan-2.0.101-py3-none-any.whl
| Download URL | fundrive_alipan-2.0.101-py3-none-any.whl |
|---|---|
| Size | 13.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7140758adf25a8d11c22817126fdaee81e139aa420b73ec9204d372b94c8c65a
|
|
BLAKE2b-256 checksum How to use checksums |
7e182a7db365dfbddf1b6b88d6129ebf3cd7b6dace9d774639057725a2b395f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for fundrive-alipan 2.0.101
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.