Jararaca Microservice Framework
Overview
Jararaca is an async-first microservice framework designed to simplify the development of distributed systems. It provides a comprehensive set of tools for building robust, scalable, and maintainable microservices with a focus on developer experience and type safety.
Key Features
REST API Development
- Easy-to-use interfaces for building REST APIs
- Automatic request/response validation
- Type-safe endpoints with FastAPI integration
- Automatic OpenAPI documentation generation
Message Bus Integration
- Topic-based message bus for event-driven architecture
- Support for both worker and publisher patterns
- Built-in message serialization and deserialization
- Easy integration with AIO Pika for RabbitMQ
Distributed WebSocket
- Room-based WebSocket communication
- Distributed broadcasting across multiple backend instances
- Automatic message synchronization between instances
- Built-in connection management and room handling
Task Scheduling
- Cron-based task scheduling
- Support for overlapping and non-overlapping tasks
- Distributed task execution
- Easy integration with message bus for task distribution
TypeScript Integration
- Automatic TypeScript interface generation
- Command-line tool for generating TypeScript types
- Support for REST endpoints, WebSocket events, and message bus payloads
- Type-safe frontend-backend communication
@ExposeTypedecorator - Explicitly expose types for TypeScript generation without needing them in endpoints
Hexagonal Architecture
- Clear separation of concerns
- Business logic isolation from infrastructure
- Easy testing and maintainability
- Dependency injection for flexible component management
Observability
- Built-in OpenTelemetry integration
- Distributed tracing support
- Logging and metrics collection
- Performance monitoring capabilities
Quick Start
Installation
pip install jararaca
Basic Usage
from jararaca import Microservice, create_http_server
from jararaca.presentation.http_microservice import HttpMicroservice
# Define your microservice
app = Microservice(
providers=[
# Add your providers here
],
controllers=[
# Add your controllers here
],
interceptors=[
# Add your interceptors here
],
)
# Create HTTP server
http_app = HttpMicroservice(app)
web_app = create_http_server(app)
Running the Service
# Run as HTTP server
jararaca server app:http_app
# Run as message bus worker
jararaca worker app:app
# Run as scheduler
jararaca scheduler app:app
# Generate TypeScript interfaces
jararaca gen-tsi app.main:app app.ts
Documentation
For detailed documentation, please visit our documentation site.
Examples
Check out the examples directory for complete working examples of:
- REST API implementation
- WebSocket usage
- Message bus integration
- Task scheduling
- TypeScript interface generation
Contributing
Contributions are welcome! Please read our contributing guidelines for details on our code of conduct and the process for submitting pull requests.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Release files for jararaca 0.5.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jararaca-0.5.3.tar.gz | 469.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jararaca-0.5.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 650.1 kB
Release files / jararaca-0.5.3.tar.gz
| Download URL | jararaca-0.5.3.tar.gz |
|---|---|
| Size | 469.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0938b59c3e2b3423614fd8345c4e0de557ddf39ca2a339d60bb5db2e219a7679
|
|
BLAKE2b-256 checksum How to use checksums |
a6c1aca6e85faf13c4797d07b04796c5898b8c3d63fcc9099616eb7255c7c8c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.0 CPython/3.14.4 Linux/6.18.44-1-lts
|
Release files / jararaca-0.5.3-py3-none-any.whl
| Download URL | jararaca-0.5.3-py3-none-any.whl |
|---|---|
| Size | 180.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6b48211d8acb28a4e0a2bed8566a538350fe003cdce0d6a9dbdd1bc7791c43cb
|
|
BLAKE2b-256 checksum How to use checksums |
714d2fd6500ae33b8fdc557e0b21e5dbebb741e27e1eae310b120dab2ea30e96
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.0 CPython/3.14.4 Linux/6.18.44-1-lts
|