All Projects β†’ t10d β†’ kingdom-python-server

t10d / kingdom-python-server

Licence: other
Modular, cohesive, transparent and fast web server template

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to kingdom-python-server

ftgogo
FTGOGO - event-driven architecture demonstration application using edat
Stars: ✭ 82 (+310%)
Mutual labels:  ddd, event-driven, hexagonal-architecture, ports-and-adapters
typescript-ddd-example
πŸ”·πŸŽ― TypeScript DDD Example: Complete project applying Hexagonal Architecture and Domain-Driven Design patterns
Stars: ✭ 607 (+2935%)
Mutual labels:  ddd, hexagonal-architecture, ddd-example
Library
This is a project of a library, driven by real business requirements. We use techniques strongly connected with Domain Driven Design, Behavior-Driven Development, Event Storming, User Story Mapping.
Stars: ✭ 2,685 (+13325%)
Mutual labels:  ddd, hexagonal-architecture, ports-and-adapters
typescript-ddd-course
πŸ”·πŸ”– TypeScript DDD Course: Learn Domain-Driven Design in TS lesson by lesson
Stars: ✭ 28 (+40%)
Mutual labels:  ddd, hexagonal-architecture, ddd-example
DDD
Domain-Driven Design example
Stars: ✭ 116 (+480%)
Mutual labels:  ddd, hexagonal-architecture, ports-and-adapters
ddd-example-ecommerce
Domain-driven design example in Java with Spring framework
Stars: ✭ 73 (+265%)
Mutual labels:  ddd, event-driven, hexagonal-architecture
csharp-ddd-skeleton
🦈✨ C# DDD Skeleton: Bootstrap your new C# projects applying Hexagonal Architecture and Domain-Driven Design patterns
Stars: ✭ 67 (+235%)
Mutual labels:  ddd, hexagonal-architecture, ddd-example
Manuals
Do design No code πŸ’»πŸ“±πŸ›’πŸ“š
Stars: ✭ 1,969 (+9745%)
Mutual labels:  ddd, ddd-patterns
Event Sourcing Jambo
An Hexagonal Architecture with DDD + Aggregates + Event Sourcing using .NET Core, Kafka e MongoDB (Blog Engine)
Stars: ✭ 159 (+695%)
Mutual labels:  ddd, event-driven
Dotnet New Caju
Learn Clean Architecture with .NET Core 3.0 πŸ”₯
Stars: ✭ 228 (+1040%)
Mutual labels:  ddd, event-driven
dddplus-archetype-demo
♨️ Using dddplus-archetype build a WMS in 5 minutes. 5εˆ†ι’Ÿζ­ε»ΊδΈ€δΈͺ仓储中台WMS!
Stars: ✭ 56 (+180%)
Mutual labels:  ddd, ddd-example
Goes
Go Event Sourcing made easy
Stars: ✭ 144 (+620%)
Mutual labels:  ddd, event-driven
Coolstore Microservices
A full-stack .NET microservices build on Dapr and Tye
Stars: ✭ 1,903 (+9415%)
Mutual labels:  ddd, ddd-example
Php Ddd Example
🐘🎯 Hexagonal Architecture + DDD + CQRS in PHP using Symfony 5
Stars: ✭ 1,960 (+9700%)
Mutual labels:  ddd, hexagonal-architecture
Digital Restaurant
DDD. Event sourcing. CQRS. REST. Modular. Microservices. Kotlin. Spring. Axon platform. Apache Kafka. RabbitMQ
Stars: ✭ 222 (+1010%)
Mutual labels:  modular, ddd
repository
[PHP 7] Implementation and definition of a base Repository in Domain land.
Stars: ✭ 26 (+30%)
Mutual labels:  ddd, hexagonal-architecture
Eventflow.example
DDD+CQRS+Event-sourcing examples using EventFlow following CQRS-ES architecture. It is configured with RabbitMQ, MongoDB(Snapshot store), PostgreSQL(Read store), EventStore(GES). It's targeted to .Net Core 2.2 and include docker compose file.
Stars: ✭ 131 (+555%)
Mutual labels:  ddd, event-driven
awesome-software-architecture
A curated list of awesome articles, videos, and other resources to learn and practice software architecture, patterns, and principles.
Stars: ✭ 1,594 (+7870%)
Mutual labels:  ddd, event-driven
eShopOnWeb
Sample ASP.NET Core 6.0 reference application, powered by Microsoft, demonstrating a layered application architecture with monolithic deployment model. Download the eBook PDF from docs folder.
Stars: ✭ 8,250 (+41150%)
Mutual labels:  ddd, ddd-patterns
permacoop
Open source and eco design ERP solution reserved for worker-owned business.
Stars: ✭ 167 (+735%)
Mutual labels:  ddd, hexagonal-architecture

kingdom-python-server 🐍

Modular, transparent, batteries (half) included, lightning fast web server. Features a functional, isolated business layer with an imperative decoupled shell.

Goal

This is intendend as both to serve as a scaffold for our internal projects as to improve and give back to our community as an efficient bullet-proof backend design, leveraging Python's expressability.

Features

  • Lightning fast ASGI server via uvicorn.
  • GraphQL support via ariadne.
  • Full GraphQL compliant query pagination support.
  • JWT authentication.
  • Resource-based authorization integrated using GraphQL directives.
  • Efficient dependency management via poetry
  • Database migration systems using alembic.
  • Event-driven architecture:
    • Internal message bus that injects adapters dependencies into service-handlers functions.
    • External message bus for background workers integrated w/ AWS Lambda.
  • Sober test pyramid: units, integrations and e2e tests.
  • Decoupled service layer that responds only to commands and events.
  • Aggregate's atomic services consistency guaranteed using postgres isolation levels locks.
  • Isolated and pure domain layer that has no dependencies (no, not even with ORM).

Roadmap

This is project's in its early stages, and should receive a big WIP tag. We should track progress using GitHub features:

  1. Discussions for brainstorming & prioritizing
  2. Milestones for planned features
  3. Issues for ongoing tasks

Instructions

There are two ways to run this: i. Locally, through a virtual pyenv; ii. Using docker-compose.

We like Makefile interface and while we also don't deliver an appropriate and fancy CLI, commands will be handled there. To find out which commands are available, cat Makefile.

This projects uses poetry to manage dependencies. Even though poetry is way too slow to run poetry install, we find that for managing dependencies' version compatibility is a valuable tool.

While we don't have a fully automated build pipeline, we agree to poetry export -f requirements.txt > requirements.txt.

Local docker

Make sure docker daemon is running.

Step 1: Build image

make build

Step 2: Serve it or test it

make service
make test

Step 3 (Optional): Clean containers

make clean

Local python

Step 1: Dependencies & environment

Having said that, how you instantiate your virtual environment is up to you. You can do that now.

Inside your blank python virtual environment:

pip install -r requirements.txt 

Step 2: Prepare your database

As there aren't any containerization being done for now, you'd need postgres up and running in your local machine.

psql -c "create database template"

Step 3: Test it

Right now you should be able to run the entire test-suite properly.

make test-local 

Why?

Why not use django? Or flask? Or FastAPI? Even though these are great frameworks they're (mostly heavily) opiniated. At T10, we have a need to implement and deliver maintainable software that we really know what's happening under the (at least conceptual Pythonic-layer) hood. As a software house, we've also come to find that by using such frameworks programmers are more likely to be inhibited from practicing and improving their software design skills.

We're (obviously) not alone here. pca have touched base a few years ago.

Philosophy

We are committed to these non-negotiables principle:

  1. Modularity, high cohesion and low coupling
  2. Transparency, ensuring readable, debugabble, maintainable software
  3. Orthogonality, which makes us sane by dilligently avoiding code that emmits side-effects
  4. Testability, we need code that can be (as easily as possibly) tested

Inspiration

We don't claim to have created everything from scratch. Quite the opposite, the work here is a direct fork from ideas we really identify with that were hard earned throughout the past two decades.

Specifically:

  1. Architecture Patterns with Python from Bob Gregory & Harry Percival,
  2. Python Clean Architecture, from pcah
  3. Functional Core, Imperative Shell from Destroy All Software,
  4. Hexagonal Architecture aka Ports & Adapters by Alistair Cockburn
  5. Domain-Driven-Design by Eric Evans & Martin Fowler
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].