fundrive-pan115
115 网盘 Python API 封装(fundrives.pan115),从上游 p115client(0.0.9.6.5.1)完整迁入并自主维护,供 fundrive 及其他项目以统一命名空间稳定接入 115 网盘,避免受上游高频破坏性变更影响。
安装
本项目要求 Python 3.12 或更高版本。
pip install fundrive-pan115
# 或
uv add fundrive-pan115
快速开始
from pathlib import Path
from fundrives.pan115 import P115Client
# 方式一:使用 Cookie 字符串
client = P115Client(cookies="UID=...; CID=...; SEID=...; KID=...")
# 方式二:使用 Cookie 文件并支持扫码/续期
client = P115Client(Path("~/115-cookies.txt").expanduser(), app="qandroid")
client.login()
# 列出根目录文件
resp = client.fs_files(0)
print(resp)
开发
安装开发依赖并运行检查与测试:
uv sync --group dev
uv run ruff check src tests
uv run ruff format --check src tests
uv run pytest -v
构建发行包:
uv build
演进路线
- 阶段 0(已完成):完整迁入
p115client 0.0.9.6.5.1至fundrives.pan115命名空间,保持 API 100% 兼容,隔离上游高频改动。 - 阶段 1 & 2(已完成):移除未使用的
python-encode_uri,将全部 35 个上游微包内联至fundrives.pan115._vendor/,并用标准httpx替换urllib3-future避免劫持标准urllib3,实现 0 个上游作者微包依赖(仅剩 10 个主流标准生态包)。 - 后续持续演进:按需精简未用模块并逐步收紧
pyproject.toml中的per-file-ignores。
命名空间说明
本包与 fundrive-alipan、fundrive-baidu、fundrive-lanzou、fundrive-quark 共用 PEP 420 隐式命名空间包 fundrives,不得在 src/fundrives/ 下添加 __init__.py。
来源说明与第三方协议
src/fundrives/pan115/ 源码派生自 p115client(版本 0.0.9.6.5.1),原始协议为 MIT,Copyright (c) 2024 ChenyangGao。完整声明见 THIRD_PARTY_NOTICE.md。
关于 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-pan115 2.0.99
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_pan115-2.0.99-py3-none-any.whl | Python 3 | none | any | Details for fundrive_pan115-2.0.99-py3-none-any.whl |
Release files / fundrive_pan115-2.0.99-py3-none-any.whl
| Download URL | fundrive_pan115-2.0.99-py3-none-any.whl |
|---|---|
| Size | 448.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
54aa05b3c676455ed6b150a379c224e36aa7441f8be56333e0b6a3ea8c0cd960
|
|
BLAKE2b-256 checksum How to use checksums |
36e26634df65cf3aa0afa6fbbd1ff12dd7e99f2eb3712174d6f5f5c5cc2ce707
|
| 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-pan115 2.0.99
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.