Python package for easily interfacing with MediaCatch APIs and data formats. Documentation can be found at api.mediacatch.io/mediacatch/docs/.
Requirements
- Python >= 3.10
- uv
- MediaCatch API key (contact support@mediacatch.io)
Installation
Install the mediacatch CLI with uv
uv tool install mediacatch
To use mediacatch as a library in your own project, add it as a dependency instead
uv add mediacatch
Upgrading
Upgrade the CLI to the latest version
uv tool upgrade mediacatch
If you added mediacatch to a project, upgrade it with
uv sync --upgrade-package mediacatch
Development
Set up the pre-commit hooks (ruff, formatting) with
uv tool install prek && prek install
Getting Started
Firstly, add your MediaCatch API key to your environment variables
export MEDIACATCH_API_KEY=<your-api-key-here>
Then you can start using the command line interface
mediacatch --help
Usage: mediacatch [OPTIONS] COMMAND [ARGS]...
MediaCatch CLI tool
Options:
-v, --version Show program's version number and exit
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or
customize the installation.
-h, --help Show this message and exit.
Commands:
speech CLI tool to run inference with MediaCatch Speech API
vision CLI tool to run inference with MediaCatch Vision API
viz CLI tool to visualize the results of MediaCatch
embed CLI tool to embed files for speech and face recognition with...
Upload a file to MediaCatch Speech API and get the results
mediacatch speech path/to/file --save-result path/to/save/result.json
# or to see options
mediacatch speech --help
Options that take several values, such as --topics, --output-languages and viz --detect-classes, are given once per value
mediacatch speech path/to/file --topics sport --topics news --output-languages en --output-languages de
Upload a file to MediaCatch vision API and get the results
mediacatch vision ocr path/to/file --save-result path/to/save/result.json
# or to see options
mediacatch vision --help
Or import as a module
from mediacatch.vision import upload, wait_for_result
file_id = upload(
fpath='path/to/file',
type='ocr',
# Optional parameters with their default values
fps=1, # Frames per second for video processing. Defaults to 1.
tolerance=10, # Tolerance for text detection. Defaults to 10.
min_bbox_iou=0.5 # Minimum bounding box intersection over union for text detection. Defaults to 0.5.
min_levenshtein_ratio=0.75 # Minimum Levenshtein ratio for merging text detection (more info here: https://rapidfuzz.github.io/Levenshtein/levenshtein.html#ratio). Defaults to 0.75.
moving_threshold=50, # If merged text detections center moves more pixels than this threshold, it will be considered moving text. Defaults to 50.
max_text_length=3, # If text length is less than this value, use max_text_confidence as confidence threshold. Defaults to 3.
min_text_confidence=0.5, # Confidence threshold for text detection (if text length is greater than max_text_length). Defaults to 0.5.
max_text_confidence=0.8, # Confidence threshold for text detection (if text length is less than max_text_length). Defaults to 0.8.
max_height_width_ratio=2.0, # Discard detection if height/width ratio is greater than this value. Defaults to 2.0.
get_detection_histogram=False, # If true, get histogram of detection. Defaults to False.
detection_histogram_bins=8, # Number of bins for histogram calculation. Defaults to 8.
)
result = wait_for_result(file_id)
Visualize the results from MediaCatch
mediacatch viz ocr path/to/file path/to/result.json path/to/save.mp4
# or to see options
mediacatch viz --help
Metadata
Release files for mediacatch 0.6.0
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 |
|---|---|---|---|---|
| mediacatch-0.6.0.tar.gz | 364.9 kB | With provenance | Details for mediacatch-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mediacatch-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for mediacatch-0.6.0-py3-none-any.whl |
Total release size: 553.1 kB
Release files / mediacatch-0.6.0.tar.gz
| Download URL | mediacatch-0.6.0.tar.gz |
|---|---|
| Size | 364.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6b6658bae60f535173c776ae6a894d55e92cec68e498427bb6808ae77d9c7929
|
|
BLAKE2b-256 checksum How to use checksums |
7c262dc81440e645d4acb10a9fcce93be8be165d860230ee1749c036dd3f605c
|
| 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 Oct 6, 2026.
Transparency logRelease files / mediacatch-0.6.0-py3-none-any.whl
| Download URL | mediacatch-0.6.0-py3-none-any.whl |
|---|---|
| Size | 188.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0cba684b6b95738ee4f027f29f0a00eb8bb9dda37a85ceffc2fb15e70777b7cb
|
|
BLAKE2b-256 checksum How to use checksums |
303ecf5bb50b9cd60166479696f7a3e193846c0c3f62ddce9eda993015a30bcd
|
| 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 Oct 6, 2026.
Transparency logSecurity for mediacatch 0.6.0
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 mediacatch-0.6.0.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 Oct 6, 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.