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.1.tar.gz (3.8 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.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: miraveja_protos-0.1.1.tar.gz
  • Upload date:
  • Size: 3.8 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.1.tar.gz
Algorithm Hash digest
SHA256 c038cdc67b5f90613c2335a8cd93c98a8d4063e6da8044cb1e325ef41f23681b
MD5 ffd7b07fb24fc7e4952e18c50fce0228
BLAKE2b-256 f17ef07671c0b29946e3ae67a916b1ba48764c2e5f60407b4e363d71b4f29746

See more details on using hashes here.

Provenance

The following attestation bundles were made for miraveja_protos-0.1.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for miraveja_protos-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bf95536bc5751c6d2e837c8b46fb1538abd0ff9c1eee74363614b84875d4f996
MD5 97d7480ec03e6ab01b2f58c74fb9e300
BLAKE2b-256 3cf635d339044dc07ea673427b7ac31b9ef55a626af829e94d1c23bc86b0f5e0

See more details on using hashes here.

Provenance

The following attestation bundles were made for miraveja_protos-0.1.1-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