Skip to main content

cow_transfer

安装

pip install cow_transfer

使用

文件下载

一个完整的奶牛快传的文章下载链接就像这样:https://xiyoucloud.cowtransfer.com/s/9f9b7c098b9049
你可以根据文件的 id 来下载文件 9f9b7c098b9049。

cow download -u 9f9b7c098b9049
Usage: cow download [OPTIONS]

Options:
  -u, --urlcode TEXT     urlcode for download file  [required]       
  -t, --threads INTEGER  set threads for download file  [default: 20]
  -p, --path PATH        set save path for download file
  -h, --header_file_path PATH header file path
  --help                 Show this message and exit.

文件上传

Usage: cow upload [OPTIONS]

  CowTransfer - 奶牛快传

Options:
  --header_file_path PATH header file path
  --upload_path TEXT    待上传文件或目录路径  [required]
  --folder_name TEXT    文件夹名称
  --title TEXT          传输标题
  --message TEXT        传输描述
  --valid_days INTEGER  传输有效期(天)  [default: 7]
  --chunk_size INTEGER  分块大小(字节)  [default: 2097152]
  --threads INTEGER     上传并发数  [default: 5]
  --help                Show this message and exit.

默认情况下会开启 20 个线程对文件进行下载,这会大大加快下载速度,不过下载速度还受到网络带宽的限制,即下载速度最快不会超过网络带宽。

打包源码发布到Pypi

# 安装依赖
pip install wheel
pip install twine
# 打包
python setup.py bdist_wheel sdist

# 上传打包后的 python 包到 https://pypi.org
twine upload dist/*

Release files for cow-transfer 0.0.6

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

Source distribution (sdist)

Source distribution for cow-transfer 0.0.6
File Size Uploaded
cow_transfer-0.0.6.tar.gz 9.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cow-transfer 0.0.6
File Interpreter ABI Platform
cow_transfer-0.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 20.4 kB

Release files / cow_transfer-0.0.6.tar.gz

Download URL cow_transfer-0.0.6.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e5cefbe66d0e262fe011cdba1d71ad96730374d7d50728d744ec1dc66613ce0b
BLAKE2b-256 checksum
How to use checksums
72ffd1095b430650a9ce6d33d9f3979eba7c45a5c5782914553c4e75779f3451
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.8

Release files / cow_transfer-0.0.6-py3-none-any.whl

Download URL cow_transfer-0.0.6-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6e7a4af215d2475b2bd91408aef1934035ddafd0376dde6d3c191e148fd3c66d
BLAKE2b-256 checksum
How to use checksums
74f44fb85cc76384dd7df59ca0d69c40ea2c77567cd43e316b08fd4fd3db8c23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.8

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

1 release file

0.0.1

3 release files

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