Skip to main content

Shared Pydantic models for RElab Raspberry Pi Camera plugin models

Project description

relab-rpi-cam-models

Shared transport contracts for the RELab Raspberry Pi Camera plugin and the RELab platform, part of the CML RELab project.

Overview

This package provides stable, hardware-independent DTOs for camera, image, stream, and private device-seam payloads exchanged between the plugin and backend.

Within this repository the package is consumed through the uv workspace, so plugin changes and contract changes can be developed together without a manual publish step. Outside this repository, install it from PyPI (or your internal package index) like any normal Python package.

The published package version is the contract baseline for downstream repos. The workspace link in this repo is intentionally just a local development override, not a second source of truth.

Usage

Install from PyPI (or your internal index):

pip install relab-rpi-cam-models

Import models in your code:

from relab_rpi_cam_models.camera import CameraMode, CameraStatusView
from relab_rpi_cam_models.device_seam import PairingPollResponse, RelayCommandEnvelope
from relab_rpi_cam_models.images import ImageMetadata
from relab_rpi_cam_models.stream import StreamView, StreamMode

From the repo root, update the workspace lock file after contract changes with:

uv lock --upgrade relab-rpi-cam-models

Public API

The supported public API is intentionally small:

  • CameraMode
  • CameraStatusView
  • StreamMode
  • StreamView
  • StreamMetadata
  • ImageCaptureResponse
  • private backend<->plugin device seam models for pairing, relay, local access, and upload acknowledgements
  • image metadata DTOs used inside those responses

This package does not own:

  • frontend/public API schemas generated from backend OpenAPI
  • runtime stream state
  • provider-specific request models such as YouTube stream config
  • Pillow or EXIF helper behavior
  • implementation-specific exceptions
  • plugin runtime wiring such as AppRuntime, RuntimeState, PairingService, or RelayService

Treat anything outside the documented DTOs as private and subject to change.

In practical terms:

  • backend OpenAPI remains the public/frontend contract
  • relab_rpi_cam_models owns only the private backend<->plugin device seam
  • frontend code should consume backend-generated types, not these private DTOs

License

AGPL-3.0-or-later

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

relab_rpi_cam_models-0.3.1.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

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

relab_rpi_cam_models-0.3.1-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file relab_rpi_cam_models-0.3.1.tar.gz.

File metadata

  • Download URL: relab_rpi_cam_models-0.3.1.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for relab_rpi_cam_models-0.3.1.tar.gz
Algorithm Hash digest
SHA256 24a9274af941ca92a131d46401c770170a63c654c8ac0e051bdfa09696824900
MD5 71500b6dd8daaa2f0a8c846741e5ad1c
BLAKE2b-256 528de93053d0335b92a1b10ff3e714e5a5e3594dce420963bf0c002e93dda84f

See more details on using hashes here.

Provenance

The following attestation bundles were made for relab_rpi_cam_models-0.3.1.tar.gz:

Publisher: models-publish.yml on CMLPlatform/relab-rpi-cam-plugin

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

File details

Details for the file relab_rpi_cam_models-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for relab_rpi_cam_models-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a7275477feb1d6a1bbd6311b41a615e4e2e7d00533e73c5a3a95ef807f793ae9
MD5 879e82ea567884fcfa54d78d0fd09a3d
BLAKE2b-256 5f9c3163f36caea1b2bc4f936d2566dc1a5e7c5277e1ec7687ff90fc53c39a29

See more details on using hashes here.

Provenance

The following attestation bundles were made for relab_rpi_cam_models-0.3.1-py3-none-any.whl:

Publisher: models-publish.yml on CMLPlatform/relab-rpi-cam-plugin

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