tezzinc — Python SDK
The official Python client for the Tezzinc video transcoding & subtitling platform. A thin, typed wrapper over the same REST API the console and the MCP server use.
pip install tezzinc
Quickstart
import os
from tezzinc import Tezzinc, TezzincError
client = Tezzinc(api_key=os.environ["TEZZINC_API_KEY"]) # or just Tezzinc()
# 1. Register a source
asset = client.assets.create(
source_uri="https://example.com/clip.mp4",
content_type="video/mp4",
)
# 2. Submit a transcode
job = client.jobs.create(
asset_id=asset.id,
spec={"preset_id": "h264_1080p"},
correlation_id="my-first-job",
)
print("submitted", job.id, "status=", job.status)
# 3. Wait for it (polling; use a webhook on a server)
final = client.jobs.wait_for(job.id, timeout=600, poll_interval=2.0)
# 4. Read the outputs (signed, short-lived URLs)
for out in final.outputs:
signed = client.outputs.signed_url(out.id, ttl_seconds=900)
print(out.preset_id, out.byte_size, signed.url)
Configuration
The client reads the API key from, in order: the api_key= argument, the
TEZZINC_API_KEY environment variable, or Tezzinc.from_config("config.json").
The base URL defaults to https://tezzinc.com and can be overridden with
base_url= or TEZZINC_API_BASE.
Errors
Every non-2xx response raises TezzincError with .status (HTTP code),
.code (machine-readable, e.g. "quota_exceeded"), .message, and
.headers (read Retry-After on a 429). Transport failures raise
TezzincConnectionError (a subclass, status == 0).
from tezzinc import TezzincError
try:
client.jobs.create(asset_id=asset.id, spec={"preset_id": "h264_1080p"})
except TezzincError as e:
if e.status == 429:
retry_after = int(e.headers.get("Retry-After", "60"))
elif e.status >= 500:
... # retry with jitter
Resources
| Namespace | Methods |
|---|---|
client.assets |
create, get, list, delete |
client.jobs |
create, get, list, cancel, wait_for |
client.presets |
list |
client.outputs |
signed_url |
Responses are attribute-accessible (job.status, job.outputs[0].preset_id)
and also expose .raw for the underlying dict.
MIT licensed.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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
File details
Details for the file tezzinc-0.1.0.tar.gz.
File metadata
- Download URL: tezzinc-0.1.0.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6073cbeb8acb9edf64beef5d4d8ddec278d4277c940ee5e337d534e2005f1cc1
|
|
| MD5 |
cb028a7566abc7813571a51bb90f0725
|
|
| BLAKE2b-256 |
e1fee953785ef35e4d4edd2d68a20f07ad435bf2308bb7cef8175024f2210b8f
|
File details
Details for the file tezzinc-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tezzinc-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa25b2dc62b9d9544495c4d90a8298c2d7b28f93ea80b8fe602a77a5570db7e1
|
|
| MD5 |
0e7380b23a5f0f35b04d59aab66463d1
|
|
| BLAKE2b-256 |
10ba44fa1993414987ea7ee88c63e3e434012c5de68d2b6197461024fbd3cb1f
|