A Python framework that integrates FastAPI and gRPC to simplify building cloud-native microservices with unified HTTP and RPC support.
Bali is a Python framework that integrates FastAPI and gRPC to simplify cloud-native microservices development. It provides a unified resource layer allowing developers to write code once that supports both HTTP and RPC interfaces, reducing duplication and improving consistency. The framework includes built-in database integration with SQLAlchemy, automatic schema generation, and utilities for caching and testing.
Backend developers and teams building cloud-native microservices in Python who need to expose services via both HTTP/REST and gPC protocols. It's particularly useful for projects requiring consistent API interfaces across different communication methods.
Developers choose Bali because it eliminates the need to maintain separate codebases for HTTP and RPC interfaces, significantly reducing development time and potential inconsistencies. Its integrated approach with FastAPI's modern features and gRPC's performance makes it a productive choice for microservices architecture.
Simplify declarative cloud-native development base on FastAPI and gRPC. https://bali-framework.github.io/bali/
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The Resource layer allows writing actions once that automatically expose both HTTP endpoints and gRPC methods, eliminating code duplication for dual-protocol services.
Built-in SQLAlchemy integration with BaseModel providing automatic timestamps and active flags, plus convenient CRUD operations through sqla-wrapper, speeding up database interactions.
model_to_schema function generates Pydantic schemas directly from SQLAlchemy models, reducing manual schema definition and ensuring consistency between models and APIs.
Includes GRPCTestBase for easy gRPC service testing, minimizing setup for validating both HTTP and RPC interfaces in microservices.
Dependencies like grpcio are pinned to specific versions (<1.50), which can cause compatibility issues with other libraries or hinder upgrades to newer gRPC features.
The framework enforces an opinionated layout, which may not integrate well with teams' existing conventions, CI/CD pipelines, or monorepo setups.
Focus on HTTP and gRPC means it lacks built-in support for other protocols like WebSockets or GraphQL, requiring additional workarounds for full-stack applications.