Skip to main content

A versioned, centralized protobuf specification package for all MiraVeja microservices, distributed as a PyPI package.

Project description

๐Ÿ“ฆ miraveja-protos

Python Version License Code Style Status CI

Protobuf definitions and generated bindings for the Miraveja ecosystem

Etymology: Protocol buffers (protos) used throughout the Miraveja microservices and SDKs

๐Ÿš€ Overview

miraveja-protos centralizes the project's Protocol Buffer definitions and the generated language bindings used by services and SDKs across the Miraveja ecosystem. It contains the canonical .proto sources (organized by domain/version) and generated Python artifacts used by consumers in this repository.

This repo is intentionally minimal: keep .proto files authoritative, and keep generated code under src/miraveja_protos/generated so consumers can import pre-built bindings when needed.

โœจ Key Features

  • ๐Ÿ“‚ Canonical .proto sources organized by domain and version
  • ๐Ÿ” Reproducible code generation workflow (scripts and Docker-friendly tooling)
  • ๐Ÿงฉ Python bindings included (ready-to-import generated modules)
  • ๐Ÿ”’ Linting and validation support with protolint (config in protolint.yaml)
  • โš™๏ธ CI-friendly: generation steps are small and automatable

๐Ÿ› ๏ธ Technology Stack

Core

  • Protocol Buffers (.proto) โ€” canonical schema format
  • protoc โ€” protocol buffer compiler
  • Python 3.10+ โ€” generated Python bindings live in src/miraveja_protos/generated

Development / Tooling

  • protolint โ€” proto linter (configured with protolint.yaml)
  • docker / docker-compose โ€” optional reproducible generation environment
  • pre-commit, black, isort, pylint, mypy โ€” code quality and checks (used across Miraveja projects)

๐Ÿ“ Repository Layout

Top-level layout (relevant parts):

.
โ”œโ”€โ”€ protos/
โ”‚   โ”œโ”€โ”€ common/
โ”‚   โ”‚   โ””โ”€โ”€ v0/greeter.proto
โ”‚   โ””โ”€โ”€ model/
โ”‚       โ””โ”€โ”€ v1/
โ”‚           โ”œโ”€โ”€ image_caption.proto
โ”‚           โ”œโ”€โ”€ image_embeddings.proto
โ”‚           โ”œโ”€โ”€ image_generation.proto
โ”‚           โ”œโ”€โ”€ image_safety.proto
โ”‚           โ”œโ”€โ”€ image_tagging.proto
โ”‚           โ”œโ”€โ”€ image_title.proto
โ”‚           โ”œโ”€โ”€ post_text.proto
โ”‚           โ””โ”€โ”€ text_embeddings.proto
โ”œโ”€โ”€ scripts/
โ”‚   โ””โ”€โ”€ generate_python.sh         # helper to generate python bindings
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ miraveja_protos/
โ”‚       โ””โ”€โ”€ generated/             # generated Python bindings (checked-in)
โ”œโ”€โ”€ protolint.yaml
โ”œโ”€โ”€ Dockerfile
โ”œโ”€โ”€ docker-compose.yml
โ””โ”€โ”€ README.md

๐ŸŽฏ Getting Started

Prerequisites

  • protoc (for local generation) or Docker (recommended for reproducible builds)
  • Python 3.10+ to run tests or import generated bindings

Generate Python bindings

Prefer using the provided script which wraps protoc invocation and keeps generation consistent.

Unix / WSL / macOS (recommended):

./scripts/generate_python.sh

Windows PowerShell (if protoc is installed):

# run protoc manually (example)
protoc -I=protos \
  --python_out=src/miraveja_protos/generated \
  --grpc_python_out=src/miraveja_protos/generated \
  protos/model/v1/*.proto

If you prefer Docker for reproducibility, use the Dockerfile or docker-compose so the host doesn't need protoc installed.

Lint .proto files

Use protolint to validate proto style and conventions:

# install protolint (or use docker image)
protolint lint -config protolint.yaml protos/**/*.proto

๐Ÿ“ฆ Generated code

Generated Python modules are placed under src/miraveja_protos/generated.

Keep generated code in sync with .proto sources โ€” prefer small, focused commits for schema changes and generated updates.

๐Ÿงช Testing & CI

This repository's CI should validate the following (examples used across Miraveja projects):

  • Run protolint on protos/
  • Ensure generated bindings import cleanly (run a small smoke test)

๐Ÿค Contributing

Contributions are welcome. If you add or change any .proto files:

  1. Update the affected .proto under protos/.
  2. Run the generation script and confirm generated bindings are updated.
  3. Run protolint and fix any linter issues.
  4. Open a PR with schema and generated changes in the same branch.

Development checklist (recommended):

# run lint for protos
protolint lint -config protolint.yaml protos/**/*.proto

# regenerate bindings
./scripts/generate_python.sh

# run a quick python import smoke test
python -c "import miraveja_protos.generated; print('ok')"

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ‘จโ€๐Ÿ’ป Author / Contact

๐Ÿ”— Related Projects

  • ๐Ÿ“ miraveja-log โ€” Logging library that provides a clean, configurable interface for application logging.
  • ๐Ÿ’‰ miraveja-di โ€” Dependency injection container that leverages Python's type hints for automatic dependency resolution.
  • ๐Ÿ” miraveja-authentication โ€” Authentication library that implements OAuth2/OpenID Connect standards with JWT token validation and role-based authorization.
  • ๐Ÿง  ModelMora โ€” Microservice for managing and serving neural network models with efficient memory management and multi-protocol support.
  • ๐Ÿ–ผ๏ธ Miraveja โ€” AI-powered image gallery designed for exploration, inspiration, and creative workflows.

Made with โค๏ธ for the Miraveja ecosystem

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

miraveja_protos-0.1.2.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

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

miraveja_protos-0.1.2-py3-none-any.whl (28.1 kB view details)

Uploaded Python 3

File details

Details for the file miraveja_protos-0.1.2.tar.gz.

File metadata

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

File hashes

Hashes for miraveja_protos-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2662dec78c89bdd93982f5cb66d6b2ad067e7fde78025169a8c5f3808a08d3ee
MD5 81ba0e43a1c8a1d43ed17a3fc79b9903
BLAKE2b-256 daa52861d56f1a996bba3089a93c09e7559248690ee0fcf1f3d6979a03d05462

See more details on using hashes here.

Provenance

The following attestation bundles were made for miraveja_protos-0.1.2.tar.gz:

Publisher: publish.yml on JomarJunior/miraveja-protos

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

File details

Details for the file miraveja_protos-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for miraveja_protos-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cc573c610dc171db7a6e661350a4ee23e0a733a999184c11b965a1f1d72493e3
MD5 73ec623681a3fd4280fe7e85f02ae842
BLAKE2b-256 89e206624238a46371db58db36a3446f7c5e439e43558e4eabc37aa5555da216

See more details on using hashes here.

Provenance

The following attestation bundles were made for miraveja_protos-0.1.2-py3-none-any.whl:

Publisher: publish.yml on JomarJunior/miraveja-protos

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