
The use case stays. Everything around it changes.
bisslog is my open-source library for hexagonal architecture in Python. Business rules live in plain use cases with no framework code; HTTP, queues, Lambda and databases plug in as adapters. It is not a framework: the core has no external dependencies.

The problem
In most services the business logic is written inside the framework: a Flask route opens the database client, applies the rules and formats the response. It works until the service has to run as a Lambda, read from a queue or move from MongoDB to PostgreSQL. Then the rules have to be rewritten, because they were never apart.

The idea
Each service is organised around its use cases, which say what the system does. How it is triggered (HTTP, EventBridge, Lambda, a CLI) and where the data lives (MongoDB, PostgreSQL, S3) are adapters behind ports that the use cases define. An entry point is just another adapter.

Service and use-case metadata is written in YAML, so the HTTP routes, Lambda handlers and FastAPI apps can be generated instead of written by hand. Because the rules are declared apart from any framework, translating a use case to another stack, by hand or with AI assistance, is a contained task.
Packages
- bisslogThe core: use cases, ports, transactions
- bisslog-schemaService and use-case metadata in YAML
- bisslog-flaskHTTP and WebSocket routes from metadata
- bisslog-fastapiFastAPI apps generated from use cases
- bisslog-aws-lambdaLambda handlers and packaging
- bisslog-pymongoMongoDB adapters
- bisslog-supabaseSupabase adapters
Read more
- Bisslog Adapter Catalog: Organized by Purpose
- Guide to Creating Database Adapters in bisslog
- Bisslog isn't a dependency — it's a mindset
- Building Sustainable Microservices with bisslog python
- The Myth of Lightweight Frameworks: When Convenience Becomes Coupling
- Sustainable Microservices Through Separation: A Disciplined Approach to Business Logic
Want this separation in your services?
Tell me on LinkedIn about the system. I answer every message.