Modular, cohesive, transparent and fast web server template

Overview

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

As it is disclaimed the project current status, running for now means making sure tests pass. We are shortly improving the entire installation experience and usage. Hold tight.

Step 1: Dependencies & environment

This projects uses poetry to manage dependencies. 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 poetry & poetry install

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

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
Owner
T10
๐Ÿ›  We make computer do what we want. Mostly on the web
T10
GraphQL Engine built with Python 3.6+ / asyncio

Tartiflette is a GraphQL Server implementation built with Python 3.6+. Summary Motivation Status Usage Installation Installation dependencies Tartifle

tartiflette 839 Dec 31, 2022
This is a simple Python that will parse instanceStats GraphQL Query into a CSV

GraphQL Python Labs - by Gabs the CSE Table of Contents About The Project Getting Started Prerequisites Installation and Usage Roadmap Contributing Li

Gabriel (Gabs) Cerioni 1 Oct 27, 2021
Integrate GraphQL into your Django project.

Graphene-Django A Django integration for Graphene. ๐Ÿ’ฌ Join the community on Slack Documentation Visit the documentation to get started! Quickstart For

GraphQL Python 4k Dec 31, 2022
UltraGraphQL - a GraphQL interface for querying and modifying RDF data on the Web.

UltraGraphQL - cloned from https://git.rwth-aachen.de/i5/ultragraphql Updated or extended files: build.gradle: updated maven to use maven {url "https:

DrSnowbird 1 Jan 07, 2023
GraphQL framework for Python

Graphene ๐Ÿ’ฌ Join the community on Slack We are looking for contributors! Please check the ROADMAP to see how you can help โค๏ธ The below readme is the d

GraphQL Python 7.5k Jan 01, 2023
ReplAPI.it A Simple and Complete Replit API Package

Notice: Currently this project is just a framework. It does not work yet. If you want to get updated when 1.0.0 is released, then click Watch - Custo

The ReplAPI.it Project 10 Jun 05, 2022
Authorization middleware for GraphQL

GraphQL-Authz is a Python3.6+ port of GraphQL-Authz, the node.js implementation for the Casbin authorization middleware.

2 Oct 24, 2022
Lavrigon - A Python Webservice to check the status of any given local service via a REST call

lavrigon A Python Webservice to check the status of any given local service via

3 Jan 02, 2022
Tyk Open Source API Gateway written in Go, supporting REST, GraphQL, TCP and gRPC protocols

Tyk API Gateway Tyk is an open source Enterprise API Gateway, supporting REST, GraphQL, TCP and gRPC protocols. Tyk Gateway is provided โ€˜Batteries-inc

Tyk Technologies 8k Jan 09, 2023
graphw00f is Server Engine Fingerprinting utility for software security professionals looking to learn more about what technology is behind a given GraphQL endpoint.

graphw00f - GraphQL Server Fingerprinting graphw00f (inspired by wafw00f) is the GraphQL fingerprinting tool for GQL endpoints. Table of Contents How

Dolev Farhi 282 Jan 04, 2023
Lightning fast and portable programming language!

Photon Documentation in English Lightning fast and portable programming language! What is Photon? Photon is a programming language aimed at filling th

William 58 Dec 27, 2022
๐Ÿ”ช Facebook Messenger to email bridge based on reverse engineered auth and GraphQL APIs.

Unzuckify This repository has a small Python application which allows me to receive an email notification when somebody sends me a Facebook message. W

Radon Rosborough 33 Dec 18, 2022
Modular, cohesive, transparent and fast web server template

kingdom-python-server ๐Ÿ Modular, transparent, batteries (half) included, lightning fast web server. Features a functional, isolated business layer wi

T10 20 Feb 08, 2022
Pygitstats - a package that allows you to use the GitHub GraphQL API with ease in your Python programs

Pygitstats - a package that allows you to use the GitHub GraphQL API with ease in your Python programs

Dillon Barnes 4 Mar 29, 2022
Burp Suite extension to log GraphQL operations as a comment

Burp GraphQL Logger A very simple, straightforward extension that logs GraphQL operations as a comment in the Proxy view. To enable the highlight, unc

22 Jul 02, 2022
GraphQL is a query language and execution engine tied to any backend service.

GraphQL The GraphQL specification is edited in the markdown files found in /spec the latest release of which is published at https://graphql.github.io

GraphQL 14k Jan 01, 2023
This is a minimal project using graphene with django and user authentication to expose a graphql endpoint.

Welcome This is a minimal project using graphene with django and user authentication to expose a graphql endpoint. Definitely checkout how I have mana

yosef salmalian 1 Nov 18, 2021
This is a graphql api build using ariadne python that serves a graphql-endpoint at port 3002 to perform language translation and identification using deep learning in python pytorch.

Language Translation and Identification this machine/deep learning api that will be served as a graphql-api using ariadne, to perform the following ta

crispengari 2 Dec 30, 2021
ASGI support for the Tartiflette GraphQL engine

tartiflette-asgi is a wrapper that provides ASGI support for the Tartiflette Python GraphQL engine. It is ideal for serving a GraphQL API over HTTP, o

tartiflette 99 Dec 27, 2022
An unofficial Blender add-on for Autodesk's Arnold render engine.

Arnold for Blender Arnold for Blender (or BtoA) provides a bridge to the Arnold renderer from within Blender's standard interface. BtoA is an unoffici

Luna Digital, Ltd. 89 Dec 28, 2022