Skip to main content

MediaRuntime Python SDK

Official synchronous Python client for the MediaRuntime asynchronous media API.

Status: 0.1.0 release candidate. Publishing begins after PyPI ownership and GitHub trusted publishing are configured.

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.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 mediaruntime 0.1.0
File Size Uploaded
mediaruntime-0.1.0.tar.gz 16.5 kB Details

Built distribution (wheel)

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

Total release size: 33.1 kB

Release files / mediaruntime-0.1.0.tar.gz

Download URL mediaruntime-0.1.0.tar.gz
Size 16.5 kB
Tags Source
SHA-256 checksum
How to use checksums
186d401c177eeb3a935650ddf9c05d84351010204e394b88953d35565cab9a7d
BLAKE2b-256 checksum
How to use checksums
f67520f1d561e42e84f1d0e8ae3c221b19898181e8cef1dce0d2d2dd27be4f34
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

Release files / mediaruntime-0.1.0-py3-none-any.whl

Download URL mediaruntime-0.1.0-py3-none-any.whl
Size 16.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
275b6c59053bdf04b89740f92e75467d14e67b110dc2400e00186feea04a7ff3
BLAKE2b-256 checksum
How to use checksums
eef98ca1d5ebd7eb24b1a48624af7a32d93e438e9627181085a5661742a24092
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

Release history Release notifications | RSS feed

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

This release

0.1.0 This release

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