Skip to main content

PyUploadX Python SDK

pyuploadx 是 PyUploadX 文件/目录上传服务的 Python 客户端 SDK,支持小文件 Proxy 上传、 大文件 Multipart 分片 + 断点续传、目录上传(Manifest + .uploadignore)与生命周期策略。 协议与状态机见 docs/docs_product-design.md §17/§12/§13。

安装

pip install pyuploadx          # Python ≥ 3.11,第三方依赖仅 httpx

快速开始

from datetime import timedelta
from pyuploadx import UploadClient, FileLifecycle

client = UploadClient(
    base_url="http://localhost:8000",
    api_key="dev-key",
    state_dir="~/.pyuploadx/uploads",
)

result = client.upload_file(
    "./README.md",
    bucket="app-default",
    lifecycle=FileLifecycle.ttl(timedelta(days=30)),
)

job = client.upload_directory(
    "./album-assets",
    bucket="app-default",
    destination_prefix="artists/10001",
    conflict_policy="reject",
)

发版

SDK 与服务端分开发布:SDK 包 pyuploadx 在本目录构建 (bash scripts/publish-pypi.sh),服务端包 pyuploadx-server 在仓库根构建 (bash scripts/publish-pypi-server.sh),详见 docs/docs_product-design.md §37。

Metadata

Release files for pyuploadx 0.2.0

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

Source distribution (sdist)

Source distribution for pyuploadx 0.2.0
File Size Uploaded
pyuploadx-0.2.0.tar.gz 13.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyuploadx 0.2.0
File Interpreter ABI Platform
pyuploadx-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 30.7 kB

Release files / pyuploadx-0.2.0.tar.gz

Download URL pyuploadx-0.2.0.tar.gz
Size 13.9 kB
Tags Source
SHA-256 checksum
How to use checksums
30eff98740f5a16ed722b50c03c926cb0fd5019342535f99a2f4fec37e903728
BLAKE2b-256 checksum
How to use checksums
7ce2b9b512b5632aaa29407dfb4374f258a62389a008f48f6587a3407973692e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / pyuploadx-0.2.0-py3-none-any.whl

Download URL pyuploadx-0.2.0-py3-none-any.whl
Size 16.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
54b8f6a3423a7fe87886f787799e554384a77d24ea6fd82da6c991b215f17865
BLAKE2b-256 checksum
How to use checksums
b2664076ed093aaff84eb8384470b72dea4dc3fae269b32a83f59e215d95ec57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

0.10.1

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

This release

0.2.0 This release

2 release files

0.1.0

2 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