Skip to main content

Shared Protocol Buffer definitions for Nexus microservices

Project description

Nexus Proto

Shared Protocol Buffer definitions for Nexus microservices.

Why "Nexus"?

The name Nexus was chosen to represent the central connection between microservices. In many languages, "nexus" refers to a point of intersection or link, which is exactly what this project provides: an efficient hub for communication between distributed services built in different technologies. The idea is to create a convergence point that makes it easier to integrate systems, ensuring consistent and scalable communication, no matter the language or framework used. Nexus is the solution that connects and unites services in a simple and effective way.

Features

  • Centralized Protocol Definitions: All communication contracts are defined in a shared repository of .proto files.
  • Pre-Generated Python Stubs: Python stubs (*_pb2.py and *_pb2_grpc.py) are automatically generated and included in the package, eliminating the need for consumers to generate them.
  • Multi-Language Support: Easily integrate microservices written in different programming languages (e.g., Python, Node.js, Java, etc.).
  • Scalable Communication: Easily extend the system as new microservices are added to the architecture.
  • gRPC-powered: Leveraging gRPC for high-performance communication with built-in support for multiple programming languages.
  • Industry Standard: Follows best practices from projects like googleapis-common-protos, ensuring consistency and reliability.

Installation

Node.js / npm

npm install @keeps-learn/nexus-proto

📦 npm Package: https://www.npmjs.com/package/@keeps-learn/nexus-proto

Python / pip

pip install keeps-learn-nexus-proto

📦 PyPI Package: https://pypi.org/project/keeps-learn-nexus-proto/

Quick Start - Python

Using Pre-Generated Stubs (Recommended)

# Import stubs directly - no compilation needed!
from nexus_proto.generated.myaccount import users_pb2, users_pb2_grpc
from nexus_proto.generated.konquest import mission_pb2, mission_pb2_grpc
from nexus_proto.generated.billing import billing_pb2, billing_pb2_grpc

# Use message types
user = users_pb2.User(id="123", name="John Doe")

# Use service stubs with gRPC
import grpc
channel = grpc.aio.secure_channel('localhost:50051', grpc.ssl_channel_credentials())
stub = users_pb2_grpc.UserServiceStub(channel)

See USAGE.md for more detailed examples and options.

Publishing

  1. Update version in package.json, setup.py, and pyproject.toml
  2. Commit: git commit -m "Bump version to X.Y.Z"
  3. Tag: git tag vX.Y.Z
  4. Push: git push origin vX.Y.Z

GitHub Actions publishes automatically to both npmjs.com and pypi.org

See PUBLISH.md for detailed publishing instructions.

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

keeps_learn_nexus_proto-0.26.0.tar.gz (37.1 kB view details)

Uploaded Source

Built Distribution

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

keeps_learn_nexus_proto-0.26.0-py3-none-any.whl (61.3 kB view details)

Uploaded Python 3

File details

Details for the file keeps_learn_nexus_proto-0.26.0.tar.gz.

File metadata

  • Download URL: keeps_learn_nexus_proto-0.26.0.tar.gz
  • Upload date:
  • Size: 37.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for keeps_learn_nexus_proto-0.26.0.tar.gz
Algorithm Hash digest
SHA256 37c98b3140f912dbb84f22c96c4126af99701ade2783062b09aebbe246e7782b
MD5 cf2c9b88ca3ade6cd5c0ee6e59ffdabd
BLAKE2b-256 03eb931ffcf67e79563ff3078024f8e838377005e260ce927648915c6d81cc3f

See more details on using hashes here.

File details

Details for the file keeps_learn_nexus_proto-0.26.0-py3-none-any.whl.

File metadata

File hashes

Hashes for keeps_learn_nexus_proto-0.26.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ac494bb870845f76a28df117b58f2e76bd214e8d4dd0b845f9f17d60f6c81ca1
MD5 4aed4b5e6d5c8dcbac7cf04822376e0e
BLAKE2b-256 4a5236221614eb44534396ca764a73d1bfecccec4432755244d0fd1097a45f87

See more details on using hashes here.

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