Index
Compiled Python gRPC stubs for all proto services in the AIOps platform.
Description
This library contains the generated Python code (stubs) from Protocol Buffer definitions. It is used by both gRPC servers and clients to communicate using standardized service interfaces.
Features
- ✅ Full Coverage: Includes stubs for all platform services.
- ✅ Type Hints: Generated with type information for better IDE support.
- ✅ Automated Updates: Recompiled whenever proto definitions change.
Installation
1 2 3 4 5 | |
Usage
1 2 3 4 | |
Development
Setup
1 | |
Automation
Stubs are automatically regenerated when proto definitions change. The generation process:
1. Cleans up stale generated files.
2. Compiles .proto files using grpcio-tools.
3. Generates __init__.py files for proper Python package structure.
4. Includes type stubs (.pyi) for better developer experience.
To trigger generation manually from the monorepo root:
1 | |
Versioning
The grpc-stubs library follows the platform's versioning scheme. When breaking changes are made to proto definitions, the major version should be incremented. Minor changes and additions should increment the minor or patch version.
Testing
Basic import tests ensure that all generated stubs are valid Python modules:
1 | |
Code Quality
1 2 3 4 5 6 7 8 | |
Note: Generated *_pb2.py, *_pb2.pyi, and *_pb2_grpc.py files should not be edited manually.
License
Apache 2.0