
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
A Python codegen tool for transport layers in DDD, supporting most popular transport / API frameworks.
You shall pass... your domain to transport!
Gendalf is a Python code generation tool that simplifies the creation of transport layer code based on Domain-Driven Design (DDD) principles. With gendalf, you can effortlessly generate FastAPI, HTTPX, gRPC, aiohttp, and other transport framework code from your domain layer, ensuring that your business logic remains untouched while automating the generation of transport-related code.
With gendalf, you don’t have to worry about manually wiring your domain logic to transport code. Whether you're building APIs, microservices, or handling complex asynchronous communication, gendalf automates the transport layer creation: handles repetitive and error-prone process of writing endpoint handlers and clients from scratch, letting you focus on what matters most: your business logic.
This tool is designed for Python developers working on services that follow the Domain-Driven Design (DDD) approach. It's particularly useful for:
There are many tools for code generation in the Python ecosystem, but most are focused on simplifying specific tasks like serialization, or generating CRUD / REST operations. Here’s how gendalf project differs:
E.g. grpcio-tools
requires .proto
files specification first and generates client stubs & server interface, so on the
server side an additional code is required: implement request deserialization from protobuf python classes to domain
(value objects), invoke domain layer and then serialize protobuf response.
Run with gendalf src cast fastapi
. It supports:
src/api/models.py
: Pydantic models for requests and responses that mirror the domain objects. Used by client.py
and server.py
src/api/client.py
: Client classes with async methods, ready to make API calls with appropriate typings for request and
response data.src/api/server.py
: Server handler classes, which include data serialization and domain logic invocation.The generated code is complete, with no need for additional modifications.
This framework support is not supported yet.
FAQs
A Python codegen tool for transport layers in DDD, supporting most popular transport / API frameworks.
We found that gendalf demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.