Matyan API Models
Shared Pydantic models for the Matyan stack. Used by matyan-frontier (WebSocket + Kafka producer), matyan-backend (Kafka consumers, API), and matyan-client (WebSocket and REST client). Part of the Matyan experiment-tracking stack (fork of Aim).
Layout
src/matyan_api_models/— Python package. No CLI or server; import as a library.ws/— WebSocket request and response models:CreateRunWsRequest,LogMetricWsRequest,LogHParamsWsRequest,FinishRunWsRequest,SetRunPropertyWsRequest,AddTagWsRequest,RemoveTagWsRequest,LogCustomObjectWsRequest,LogTerminalLineWsRequest,LogRecordWsRequest,BlobRefWsRequest,WsRequestTAdapter,WsResponse.kafka/— Kafka message models:IngestionMessage(envelope for the data-ingestion topic),ControlEvent(for the control-events topic).- Root —
RunCreateRequest,RunCreateResponse;LogHParamsResponse,LogMetricResponse,ReadMetricResponse.
Source of truth for the wire format between frontier, backend, and client.
Prerequisites
- Python 3.10+. Single dependency:
pydantic~=2.0. The monorepo usesuv; from the package dir:uv syncthen importmatyan_api_models.
Usage
Install as a dependency (editable in the monorepo):
# From repo root or extra/matyan-api-models
uv sync
Then in Python:
from matyan_api_models.ws import CreateRunWsRequest, WsResponse
from matyan_api_models.kafka import IngestionMessage
from matyan_api_models import RunCreateRequest, RunCreateResponse
Frontier validates WebSocket payloads with WsRequestTAdapter and publishes IngestionMessage to Kafka; backend workers consume IngestionMessage and ControlEvent; the client builds WS requests from these models.
Related
- Frontier: Accepts WebSocket messages and REST run-creation; produces
IngestionMessageto Kafka. - Backend: Consumes
IngestionMessageandControlEvent; uses run-creation and response models for REST. - Client: Builds WebSocket requests and run-creation requests from these models.
- Monorepo: This package lives under
extra/matyan-api-modelsin the matyan-core repo.
Metadata
Release files for matyan-api-models 0.2.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 | Provenance | Actions |
|---|---|---|---|---|
| matyan_api_models-0.2.1.tar.gz | 28.0 kB | With provenance | Details for matyan_api_models-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| matyan_api_models-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for matyan_api_models-0.2.1-py3-none-any.whl |
Total release size: 42.1 kB
Release files / matyan_api_models-0.2.1.tar.gz
| Download URL | matyan_api_models-0.2.1.tar.gz |
|---|---|
| Size | 28.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
56a4f7a9b83e353658eb609ad94151873f1926d64dd665e94d301d9200ffa54e
|
|
BLAKE2b-256 checksum How to use checksums |
0388acad7c68575673f8e9e4fad0df446e7024fd8a138a01cc6598e0998d97df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 20, 2026.
Transparency logRelease files / matyan_api_models-0.2.1-py3-none-any.whl
| Download URL | matyan_api_models-0.2.1-py3-none-any.whl |
|---|---|
| Size | 14.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0ee288d49f056bc071d8345aa4c8d68fcdc76eb0a7cd959819821e7ef87179c5
|
|
BLAKE2b-256 checksum How to use checksums |
c88596a8eec89d14996ef5db409b4c735fd2cc466f9499282926260f66962666
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 20, 2026.
Transparency logSecurity for matyan-api-models 0.2.1
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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for matyan_api_models-0.2.1.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 Mar 20, 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.