MediaRuntime Python SDK
Official synchronous Python client for the MediaRuntime asynchronous media API.
Status: stable 0.1.1, published on PyPI with GitHub trusted publishing.
Install
pip install mediaruntime
Set MEDIARUNTIME_API_KEY; the production API URL is built in.
from mediaruntime import MediaRuntime
media = MediaRuntime()
job = media.jobs.create(
source="./video.mp4",
outputs=[{"type": "mp4", "preset": "mp4_720p_h264_aac"}],
moderation={"enabled": True, "mode": "report"},
idempotency_key="video:vid_123:v1",
)
# Useful for scripts/tests. Prefer signed webhooks in production.
result = job.wait(timeout=300)
moderation = media.jobs.get_moderation(result.id)
print(result.bundle.get("download_url"), moderation.flagged_checks)
HTTP(S) and gs:// sources are submitted directly. Other strings and pathlib.Path
instances are treated as local files and uploaded through MediaRuntime's signed upload
flow.
Verify webhooks
event = media.webhooks.verify(raw_body, request.headers)
print(event.id, event.job_id, event.status)
media.webhooks.flask(handler), fastapi(handler), and django(handler) provide optional
framework adapters without making those frameworks package dependencies. Persist and
deduplicate event.id in your own datastore before acknowledging a delivery.
See the software design document for boundaries, retry safety, security behavior, compatibility, and release gates.
Metadata
Release files for mediaruntime 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mediaruntime-0.1.1.tar.gz | 16.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mediaruntime-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.4 kB
Release files / mediaruntime-0.1.1.tar.gz
| Download URL | mediaruntime-0.1.1.tar.gz |
|---|---|
| Size | 16.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6e32d5cdff85c9bbd3cc39bf09edafba08666ecd0521d9d10c2172b7f6797a66
|
|
BLAKE2b-256 checksum How to use checksums |
4701cb83fcf58ab6f53e2b5b862dab47cf9eee5a6145fe01727e922686dc12b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 15, 2026.
Transparency logRelease files / mediaruntime-0.1.1-py3-none-any.whl
| Download URL | mediaruntime-0.1.1-py3-none-any.whl |
|---|---|
| Size | 16.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4e2ea2a8de6846760c4c4b9842fa79e8461903599abeb2efe73d252cd85ff6cd
|
|
BLAKE2b-256 checksum How to use checksums |
7a74580cb3ac2713a3637efb9f2fa515f757c9c540aedea1a800d01e604c27ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 15, 2026.
Transparency log