AnyShare / 北航网盘 CLI with Typer, Rich, and asyncio
Project description
pansh
AnyShare / 北航网盘命令行工具,支持:
pip install ./pip install -e .pansh/python -m pansh- Typer 单次命令与交互式 shell
- Rich 进度条、实时速率、平均速率、ETA、状态
- 多文件、
glob、regex上传下载 platformdirs用户配置目录- YAML 设置文件和 JSON 凭据缓存
安装
pip install -e .
安装后可直接使用:
pansh --help
python -m pansh --help
pansh --version
配置目录
默认配置目录使用 platformdirs.user_config_dir("pansh")。
典型文件布局:
settings.yaml
auth.json
支持环境变量覆盖配置文件路径:
pansh_CONFIG=/path/to/settings.yaml
首次运行会自动生成内置默认 settings.yaml 模板。
常用命令
pansh ls home
pansh stat home/file.pdf
pansh whoami --json
pansh quota --json
上传
pansh upload a.txt b.txt c.txt home/test -y
pansh upload --glob "*.pdf" --glob "*.docx" home/test -y
pansh upload --regex ".*\\.(pdf|docx)$" ./docs home/test --recursive -y
pansh upload src1 src2 src3 --exclude "*.tmp" home/test -y
下载
pansh download home/a.pdf home/b.pdf ./downloads -y
pansh download --glob "*.zip" ./downloads -y
pansh download --regex ".*2026.*\\.pdf$" home/docs ./downloads --recursive -y
pansh download --search --regex ".*报告.*" --range home/docs ./downloads -y
输出模式
pansh ls home --plain
pansh ls home --json
pansh find 报告 --json
Shell
pansh
pansh shell
交互模式内置命令:
cd,pwdlcd,lpwd,lls!<cmd>执行本地 shell 命令- 其余命令复用同一套 CLI 实现
进阶命令
pansh revisions home/file.docx
pansh restore-revision home/file.docx REVISION_ID
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pansh-3.1.0.tar.gz
(33.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
pansh-3.1.0-py3-none-any.whl
(38.9 kB
view details)
File details
Details for the file pansh-3.1.0.tar.gz.
File metadata
- Download URL: pansh-3.1.0.tar.gz
- Upload date:
- Size: 33.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f9206d60290f062194c389a3a8e6b3b3a75ab3d2e69baa29a7b7001c789df85
|
|
| MD5 |
ab6367186677e11fb87b84ee0690ad51
|
|
| BLAKE2b-256 |
792cb79fc3038f59d13a3f4dd01b6a0e175a049f65d8f3f20c140de0f3b2166e
|
File details
Details for the file pansh-3.1.0-py3-none-any.whl.
File metadata
- Download URL: pansh-3.1.0-py3-none-any.whl
- Upload date:
- Size: 38.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43d77d3f792de15c651b4c6d2281b5dfd0dc2c6084344b5f276f62494b9abf9f
|
|
| MD5 |
025231263eae925f298b1526f27321ca
|
|
| BLAKE2b-256 |
6f6499a3a2f6ad3189e96e25e030ad8a0078544c9291c275bb3b3d6acb0c9d51
|