Multi-Runtime Standard API for Python
Cloud Runtimes Python provides the Multi-Runtime Standard API for Mecha architecture projects in Python.
This project defines a unified, vendor-neutral API specification that enables Python applications to use standardized interfaces for distributed system capabilities across different runtime implementations.
| Runtime | Status | Description |
|---|---|---|
| Capa | β Used | Primary Mecha SDK implementation |
| Dapr | π Follow | Sidecar runtime reference |
| Layotto | π Follow | MOSN-based sidecar implementation |
cloud-runtimes-python/
βββ cloud_runtimes/ # Core API package
β βββ rpc/ # RPC service invocation
β βββ configuration/ # Configuration management
β βββ pubsub/ # Pub/Sub messaging
β βββ state/ # State management
β βββ secret/ # Secret management
β βββ telemetry/ # Telemetry (logs, metrics, traces)
βββ tests/ # Test suite
βββ docs/ # Documentation
βββ setup.py # Package setup
βββ pyproject.toml # Modern Python packaging
βββ requirements.txt # Dependencies
Key Design Principles:
- API-First: Clean interfaces separate specification from implementation
- Runtime Agnostic: Works with Capa SDK, Dapr, Layotto, and future runtimes
- Pythonic: Follows Python best practices (PEP 8, type hints, async/await)
- Vendor Neutral: No lock-in to specific cloud providers
| Feature | Interface | Description | Status |
|---|---|---|---|
| π Service Invocation | InvocationRuntimes |
Service-to-service communication | β Stable |
| βοΈ Configuration | ConfigurationRuntimes |
Dynamic configuration management | β Stable |
| π¨ Pub/Sub | PubSubRuntimes |
Publish/Subscribe messaging | β Stable |
| πΎ State Management | StateRuntimes |
Key-value state storage | β Stable |
| π Secret Management | SecretsRuntimes |
Secure secret retrieval | β Stable |
| π Telemetry | TelemetryRuntimes |
Logs, metrics, and traces | β Stable |
| π File System | FileRuntimes |
File storage operations | β Stable |
| π Distributed Lock | LockRuntimes |
Distributed locking | β Stable |
| Feature | Interface | Description | Status |
|---|---|---|---|
| ποΈ Database | DatabaseRuntimes |
SQL database operations | π¬ Alpha |
Cloud Runtimes Python was created to bring standardized, portable APIs to the Python ecosystem:
- Future plans for Dapr API - Community discussion on API standardization
- Make SDK independent - Decoupling API from implementation
- Decompose core and enhanced APIs - API layering strategy
pip install cloud-runtimes-python==0.0.1python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install cloud-runtimes-python==0.0.1from cloud_runtimes.core import InvocationRuntimes
async def invoke(runtime: InvocationRuntimes) -> bytes:
return await runtime.invoke_method(
app_id="service-name",
method_name="my-method",
data=b'{"key":"value"}',
)This package defines abstract interfaces. Applications must provide an adapter for their chosen runtime and inject those implementations into their own client or service layer.
InvocationRuntimes defines asynchronous
method invocation and registration, plus synchronous invocation helpers.
ConfigurationRuntimes defines get,
save, delete, subscribe, and unsubscribe operations for configuration stores.
StateRuntimes defines single and bulk state
operations, optimistic-concurrency options, and transactional operations.
Cloud Runtimes Python is part of the broader Capa Cloud ecosystem:
| Project | Language | Description |
|---|---|---|
| cloud-runtimes-jvm | Java | JVM API specification |
| cloud-runtimes-golang | Go | Go API specification |
We welcome contributions from the Python community!
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
# Clone the repository
git clone https://github.com/capa-cloud/cloud-runtimes-python.git
cd cloud-runtimes-python
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in development mode
pip install -e ".[dev]"
# Run tests
pytest tests/
# Run code quality checks
black .
isort .
flake8We use industry-standard tools for code quality:
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Building portable, vendor-neutral cloud APIs for Python


