This release is a pre-release and may not be stable for production use.
files-sdk-uploadthing
UploadThing adapter for files-sdk.
Sync and async variants over httpx, with locally-computed HMAC presigned
URLs (ported from the upstream TypeScript SDK — no UT-side roundtrip for
upload URL generation).
Install
uv add files-sdk files-sdk-uploadthing
Usage
from files_sdk import Files
from files_sdk_uploadthing import UploadThingAdapter
files = Files(adapter=UploadThingAdapter()) # reads UPLOADTHING_TOKEN
files.upload("users/123/avatar.png", b"...")
print(files.download("users/123/avatar.png").as_bytes())
Async:
from files_sdk_uploadthing import AsyncUploadThingAdapter
a = AsyncUploadThingAdapter()
await a.upload("users/123/avatar.png", b"...")
Auth
Set UPLOADTHING_TOKEN (the base64 JSON token from your UploadThing
dashboard's API Keys page) in the environment, or pass token= explicitly.
The decoded apiKey is the only secret sent — the token's appId and
regions are extracted client-side.
Notes on the protocol mapping
The adapter's key: str maps to UploadThing's customId, so paths like
users/123/avatar.png round-trip cleanly. The opaque per-file fileKey is
generated client-side and never surfaced. A few protocol mismatches are
handled transparently:
- No prefix filter on
listFiles— fetched pages are filtered in Python. Thecursoris a stringified offset. Large accounts will see this. - No server-side
copy— implemented as download + reupload. - No HEAD endpoint —
head()uses a one-byte ranged GET; theContent-Rangeheader carries the true size. - CDN routing by
customIddoesn't resolve unicode keys — falls back to/v6/getFileUrl(one extra API roundtrip) when the direct fetch 404s.
Development
Live conformance tests require UPLOADTHING_TOKEN:
export UPLOADTHING_TOKEN=eyJh...
uv run pytest packages/files-sdk-uploadthing/
Without the token, only the offline tests (_token, _signing, _hash)
run; the conformance suite skips.
Metadata
Release files for files-sdk-uploadthing 0.1.0a2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| files_sdk_uploadthing-0.1.0a2.tar.gz | 16.8 kB | With provenance | Details for files_sdk_uploadthing-0.1.0a2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| files_sdk_uploadthing-0.1.0a2-py3-none-any.whl | Python 3 | none | any | Details for files_sdk_uploadthing-0.1.0a2-py3-none-any.whl |
Total release size: 35.6 kB
Release files / files_sdk_uploadthing-0.1.0a2.tar.gz
| Download URL | files_sdk_uploadthing-0.1.0a2.tar.gz |
|---|---|
| Size | 16.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f8ea94ed85f9741ad1f452e84ed6e34aaf07780e933654f0ac75a3b16fe04c6
|
|
BLAKE2b-256 checksum How to use checksums |
84cfe6f6c77ac0a66084e978883fc14c05e4c5c273b87912f3ec381ad7abfaf5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 14, 2026.
Transparency logRelease files / files_sdk_uploadthing-0.1.0a2-py3-none-any.whl
| Download URL | files_sdk_uploadthing-0.1.0a2-py3-none-any.whl |
|---|---|
| Size | 18.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4cde3aa99a594a0104b93340f6f47622818ffdc32fc9adeef2829a6ad15e63ad
|
|
BLAKE2b-256 checksum How to use checksums |
00ac1bf6a0d90d82f54d01f33cd053e52da1d08c5252de9b9342a1b80dd5f60e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 14, 2026.
Transparency logSecurity for files-sdk-uploadthing 0.1.0a2
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for files_sdk_uploadthing-0.1.0a2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 14, 2026.
Transparency logA 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.