Skip to content

Installation

Terminal window
pip install metrana

Requires Python 3.10+.

metrana depends on the native metrana-logging-engine, which ships prebuilt wheels (there is no source distribution). Wheels are published for:

OS Architectures
Linux (glibc manylinux_2_28) x86-64, aarch64
Linux (musl musllinux_1_2) x86-64, aarch64
macOS x86-64, Apple Silicon (arm64)
Windows x86-64

On any other target — for example Windows on ARM, or a Linux older than manylinux_2_28pip install will fail to find a compatible wheel. If you need a target added, open an issue.

To log reinforcement-learning environment video with metrana.log_rendering(), install the optional rendering extra. It pulls in PyAV for client-side H.264 encoding:

Terminal window
pip install 'metrana[rendering]'

You only need this extra if you call log_rendering. Everything else works with the base install.

To store artifact bytes in an S3 bucket you own — with upload_artifact(..., storage="s3://…") and the matching download_artifact — install the optional s3 extra. It pulls in boto3 so the SDK can talk to S3 with your own AWS credentials:

Terminal window
pip install 'metrana[s3]'

You only need this extra for bring-your-own-bucket artifact storage. Metrana-managed artifact uploads and downloads work with the base install.

import metrana
print(metrana.is_initialized()) # False — nothing initialized yet, but the import worked
  • Get an API key from your workspace settings (scope ingestion:write).
  • Follow the Quickstart.