Skip to main content

MX8 media SDK

Project description

MX8 Media SDK

MX8 runs image, video, and audio transforms across large media datasets without forcing teams to build their own batch control plane.

Install

pip install mx8

Auth

Set the API base URL and bearer token in the environment:

export MX8_API_BASE_URL=http://127.0.0.1:8000
export MX8_API_KEY=your-token

If the server is configured with account-scoped keys, that token also determines which jobs the caller can see.

Quick Start

import mx8

job = mx8.run(
    input="s3://product-images/",
    work=[
        mx8.remove_background(),
        mx8.convert(format="png"),
    ],
    output="s3://cutouts/",
)

job.wait()

RAW image conversion looks like:

job = mx8.run(
    input="s3://camera-raw/",
    work=[
        mx8.resize(width=2048, height=2048, media="image"),
        mx8.convert(format="jpg", quality=90),
    ],
    output="s3://standard-images/",
)

Background removal looks like:

job = mx8.run(
    input="s3://product-images/",
    work=[
        mx8.remove_background(),
        mx8.convert(format="png"),
    ],
    output="s3://cutouts/",
)

First-class workflows

  • mx8.remove_background() for producing alpha-backed cutouts from images
  • mx8.proxy() for lighter review copies
  • mx8.remux(container="mp4") for stream-copy repackaging
  • mx8.clip() for video segment exports
  • mx8.transcode(...) for video or audio re-encoding
  • mx8.extract_frames(...) and mx8.extract_audio(...) for dataset and media prep

RAW inputs are decoded into a standard image internally when they flow through the image pipeline. If no later convert(...) overrides the output format, RAW inputs default to JPEG output. remove_background() defaults to PNG output unless a later convert(...) overrides the output format. The worker environment needs Python plus rembg available for the helper script in scripts/remove_background.py.

Job visibility

job.poll() refreshes the operational fields returned by the API:

  • job.status
  • job.stage
  • job.outputs_written
  • job.worker_pool
  • job.failure_category
  • job.failure_message
  • job.events

That means a design partner can hand you a job.id, and both sides can look at the same stage, failure reason, and recent event trail.

Operator CLI

The SDK now ships a small operator CLI:

mx8 ops watch <job_id>
mx8 ops live
  • mx8 ops watch <job_id> follows one job live
  • mx8 ops live shows the current active job table

API Shape

  • import mx8 is the primary entry point.
  • mx8.run(input=..., work=[...], output=...) is the canonical job shape.
  • Media namespaces remain available for deeper transform composition, but the default UX is an ordered work=[...] list.

See docs/api_shape.md for the current SDK and REST surface, docs/support_matrix.md for the current support line, and docs/design_partner_onboarding.md for the current onboarding/support flow.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mx8-2.0.1.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mx8-2.0.1-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file mx8-2.0.1.tar.gz.

File metadata

  • Download URL: mx8-2.0.1.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mx8-2.0.1.tar.gz
Algorithm Hash digest
SHA256 1a81e5bf4a324d1b771c450931c7f3a3b3d4304349f7e440bfae4e3025e7ca0d
MD5 3cba2272335a19b17ab59b30f3d352b4
BLAKE2b-256 18a991642c7985134a4011a14b7417fd79640054e1b926da3047ecbc9b73b761

See more details on using hashes here.

Provenance

The following attestation bundles were made for mx8-2.0.1.tar.gz:

Publisher: sdk-publish.yml on Ekom2004/mx8-media

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mx8-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: mx8-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mx8-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ac3079cb42b20997a3adff1a253016406023ce4169f0d9ccf633e52482a58cbe
MD5 7029787c7ba28363d965d125e8945b54
BLAKE2b-256 44244a71fd7b49641a687fa7f0d8f7d99b5af9edcd6c9d469114bcc4a3c3104a

See more details on using hashes here.

Provenance

The following attestation bundles were made for mx8-2.0.1-py3-none-any.whl:

Publisher: sdk-publish.yml on Ekom2004/mx8-media

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page