Skip to main content

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 / 桌面客户端。

本项目基于 MIT 协议开源。

Metadata

Release files for fundrive-alipan 2.0.102

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for fundrive-alipan 2.0.102
File Interpreter ABI Platform Actions
fundrive_alipan-2.0.102-py3-none-any.whl Python 3 none any Details for fundrive_alipan-2.0.102-py3-none-any.whl

Release files / fundrive_alipan-2.0.102-py3-none-any.whl

Download URL fundrive_alipan-2.0.102-py3-none-any.whl
Size 13.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7adf508ca92963d2a897ed3d6f14df70132d124cd09f20eeb964570d42ff2712
BLAKE2b-256 checksum
How to use checksums
df4082eb028524da24f97029a10470266c89efe6ff5a38619520798c7da2c4c3
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.102

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page