Dataset Downloader
一个支持断点续传和多线程功能的文件下载SDK。
功能特性
- 支持断点续传下载
- 多线程并发下载
- 进度条显示
- 自动重试机制
- 文件完整性校验
安装
从PyPI安装(推荐)
pip install dataset-down
开发模式安装
# 克隆仓库
git clone https://github.com/your-repo/dataset-down.git
cd dataset-down
# 构建分发包
python setup.py sdist bdist_wheel
# 安装构建好的包
pip install dist/dataset_down-0.1.0-py3-none-any.whl
# 以开发模式安装(代码修改即时生效)
pip install -e .
卸载与更新
# 卸载
pip uninstall dataset-down
# 更新到最新版本
pip install --upgrade dataset-down
# 更新到指定版本
pip install dataset-down==0.1.0
依赖包
本项目依赖以下Python包:
requests- HTTP库,用于文件下载tqdm- 进度条显示click- 命令行界面构建psutil- 系统资源监控pytz- 时区处理
安装依赖
pip install requests tqdm click psutil pytz
认证配置
在使用SDK功能前,需要先进行认证:
dataset-down login --ak YOUR_ACCESS_KEY --sk YOUR_SECRET_KEY
支持的命令
登录
dataset-down login [OPTIONS]
参数说明:
| 参数 | 是否必需 | 描述 |
|---|---|---|
--ak |
是 | Access Key |
--sk |
是 | Secret Key |
示例:
dataset-down login --ak YOUR_ACCESS_KEY --sk YOUR_SECRET_KEY
下载文件或文件夹
dataset-down download [OPTIONS]
参数说明:
| 参数 | 是否必需 | 默认值 | 描述 |
|---|---|---|---|
--dataset-id |
是 | 无 | 数据集 ID |
--version |
否 | master |
版本号 |
--source-path |
是 | 无 | 源文件路径,如果是目录则下载整个目录 |
--target-path |
否 | . (当前目录) |
目标保存路径 |
示例:
# 下载指定数据集的文件
dataset-down download --dataset-id my_dataset --source-path /path/to/file.txt --target-path /path/to/save --version master
# 下载整个目录到指定位置
dataset-down download --dataset-id my_dataset --source-path /data/dir --target-path ./local_dir --version master
停止正在运行的下载进程
dataset-down stop_running_downloading_process
断点续传
- 如果下载中断,只需重新执行相同的命令,程序会自动从断点处继续下载。
Metadata
Release files for jsdataset-down-test 0.28.0
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 |
|---|---|---|---|---|
| jsdataset_down_test-0.28.0-py3-none-any.whl | Python 3 | none | any | Details for jsdataset_down_test-0.28.0-py3-none-any.whl |
Release files / jsdataset_down_test-0.28.0-py3-none-any.whl
| Download URL | jsdataset_down_test-0.28.0-py3-none-any.whl |
|---|---|
| Size | 27.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
570bd60404791f8f6c8f222173f45cd5d2e4c283f93b1b18a374a5972a702c9f
|
|
BLAKE2b-256 checksum How to use checksums |
c5c640ff8fbeb4ece0d798c4cf26546d42848b621a37e4e35f5526ba2a6461ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.20
|
Security for jsdataset-down-test 0.28.0
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.