• Stars
    star
    1,303
  • Rank 36,110 (Top 0.8 %)
  • Language
    Python
  • License
    Creative Commons ...
  • Created over 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A curated list of awesome ASGI servers, frameworks, apps, libraries, and other resources

awesome-asgi

Awesome Versioning Build Status

A curated list of awesome ASGI servers, frameworks, apps, libraries, and other resources.

This list should help you keep yourself up to date with the most awesome ASGI projects and resources. You can watch releases on this repo to be notified about new entries. If you find anything missing, please contribute. ❣️

ASGI is a standard interface positioned as a spiritual successor to WSGI. It enables communication and interoperability across the whole Python async web stack: servers, applications, middleware, and individual components.

Born in 2016 to power the Django Channels project, ASGI and its ecosystem have been expanding ever since, boosted by the arrival of projects such as Starlette and Uvicorn in 2018.

Contents

Application frameworks

Frameworks for building ASGI web applications.

  • Asgineer - A really thin ASGI web framework, which includes support for long polling, SSE and websockets.
  • BlackSheep - BlackSheep is an asynchronous web framework to build event based web applications with Python. It is inspired by Flask, ASP.NET Core, and the work by Yury Selivanov.
  • Channels - Asynchronous support for Django, and the original driving force behind the ASGI project. Supports HTTP and WebSockets with Django integration, and any protocol with ASGI-native code.
  • Django - The web framework for perfectionists with deadlines. Has native ASGI support since version 3.0.
  • Falcon - The minimalist REST and app backend framework for Python, with a focus on reliability, correctness, and performance at scale. Native ASGI support since version 3.0.
  • FastAPI - A modern, high-performance web framework for building APIs with Python 3.6+ based on standard Python type hints. Powered by Starlette and Pydantic. Supports HTTP and WebSockets.
  • Guillotina - Full-featured ASGI-compatible REST application framework, designed for high performance and horizontally scaling solutions.
  • Pyotr - A server framework, as well as a client library, for serving and consuming OpenAPI-based Web services. Based on Starlette and HTTPX.
  • Quart - A Python ASGI web microframework whose API is a superset of the Flask API. Supports HTTP (incl. SSE and HTTP/2 server push) and WebSockets.
  • Responder - A familiar HTTP Service Framework for Python, powered by Starlette.
  • Sanic - Sanic is a Python 3.6+ web server and web framework that's written to go fast. It allows the usage of the async/await syntax added in Python 3.5, which makes your code non-blocking and speedy. Supports HTTP and WebSockets.
  • Starlette - The little ASGI framework that shines. Starlette is also an ASGI toolkit -- its modular design and reusable components made it foundational in the ASGI ecosystem. Supports HTTP and WebSockets. Supports asyncio and trio.
  • Tonberry - Tonberry is an ASGI framework that takes a class based approach to routing. Influenced by CherryPy but made compatible with asyncio and WebSockets.

Authentication

Packages for adding authentication and managing users in ASGI web applications.

  • asgi-auth-github - GitHub OAuth authentication for ASGI apps. Supports restricting to specific users or member of specific teams or organizations.
  • SessionAuth - Authenticate using sessions and cookies. (Shipped with Piccolo API, and requires Piccolo ORM.)
  • TokenAuth - Authenticate using tokens in request headers. (Shipped with Piccolo API, and requires Piccolo ORM.)

End-user applications

Real-world applications that run on ASGI.

  • Datasette - A tool for exploring and publishing data, including ASGI-compatible components and plugins.

GraphQL

Packages for building GraphQL APIs via ASGI.

  • Ariadne - A schema first Python library for implementing GraphQL servers.
  • Strawberry - A code first Python library for implementing GraphQL servers, inspired by dataclasses.
  • tartiflette-asgi - ASGI support for the Tartiflette GraphQL engine.

Monitoring

Packages for monitoring ASGI web applications.

  • asgi-correlation-id - Request/Correlation ID logging middleware
  • New Relic ASGI - New Relic integration for ASGI applications. (Shipped with newrelic.)
  • opentelemetry-python - ASGI middleware and helpers for collecting application metrics via the (currently alpha) OpenTelemetry standard. Supports HTTP and WebSocket.
  • Scout APM Starlette - Scout APM integration with Starlette and Starlette-based frameworks. (Shipped with scout-apm.)
  • Sentry ASGI - Sentry integration for ASGI frameworks. (Shipped with sentry-sdk.)
  • timing-asgi - ASGI middleware to record and emit timing metrics.

Proxies

Packages for use when running ASGI web applications behind proxies, or proxying other servers via ASGI applications.

  • asgiproxy – Tools for building HTTP and Websocket proxies for ASGI.
  • ProxyHeadersMiddleware - Use X-Forwarded-Proto and X-Forwarded-For headers set by a known and trusted proxy to make client and scheme reference the connecting client (shipped with Uvicorn).

Real-time web

Packages for use when building real-time-capable ASGI web applications.

  • python-socketio - WebSocket clients and servers using Socket.IO. Includes an ASGI application wrapper.

Resources

Content about ASGI itself: concepts, history, usage, etc.

Publications

Articles, blog posts and other publications about ASGI.

Reference

Reference documentation and implementation for ASGI.

  • ASGI Documentation - Documentation site for the ASGI specification.
  • asgiref - ASGI reference implementation, including function wrappers, server base classes, type hints, and a WSGI-to-ASGI adapter.

Talks

Talks about ASGI.

Toy projects and examples

Toy projects, examples and gists.

  • nanoasgi - A tiny zero-dependency ASGI web framework.
  • proxyx - Proof of concept for a lightweight HTTP/1.1 proxy service built with ASGI and HTTPX.

Tutorials

Tutorials about working with ASGI applications and components.

Security

Packages and components for managing the security of ASGI web applications.

  • asgi-csrf - ASGI middleware for protecting against CSRF attacks.
  • asgi-ratelimit - A customizable rate limiting ASGI middleware, with regex path matching support.
  • CORSMiddleware - Allow cross-origin requests from browsers. (Shipped with Starlette.)
  • CSPMiddleware - Tell browsers to only run Javascript from the same origin. (Shipped with Piccolo API.)
  • CSRFMiddleware - Protect against CSRF attacks when using cookies for authentication. (Shipped with Piccolo API.)
  • HTTPSRedirectMiddleware - Redirect HTTP/WS traffic to HTTPS/WSS. (Shipped with Starlette.)
  • RateLimitingMiddleware - Protect sensitive endpoints from brute force attacks. (Shipped with Piccolo API.)
  • TrustedHostMiddleware - Guard against host header attacks by validating the Host header of requests. (Shipped with Starlette.)

Serialization

Packages and components for converting the format of data in and out of ASGI web applications.

  • brotli-asgi - Response content compression using Brotli.
  • GZipMiddleware - Response content compression using GZip. (Shipped with Starlette.)
  • msgpack-asgi - Drop-in MessagePack support for ASGI apps and frameworks.

Serverless

Packages for building serverless web applications with ASGI.

  • Mangum - AWS Lambda & API Gateway support for ASGI.

Servers

Web servers for ASGI applications.

  • Daphne - An HTTP, HTTP2 and WebSocket protocol server for ASGI, developed to power Django Channels.
  • Hypercorn - An ASGI server based on the sans-io hyper, h11, h2, and wsproto libraries. Supports HTTP/1, HTTP/2, WebSockets, ASGI 2.0 and ASGI 3.0. Compatible with asyncio, uvloop and trio worker types.
  • NGINX Unit - A universal web app server that supports ASGI.
  • Uvicorn - A fast ASGI server based on uvloop and httptools. Supports HTTP/1 and WebSockets.

Testing

Packages for testing ASGI applications.

  • asgi-lifespan - Programmatic startup/shutdown of ASGI apps. Allows testing an ASGI app without having to spin up a server.
  • async-asgi-testclient - A framework-agnostic library for testing ASGI web applications.
  • HTTPX - Next generation HTTP client, including async support and ability to call ASGI apps directly.

More Repositories

1

djangorestframework-api-key

πŸ” API key permissions for Django REST Framework
Python
578
star
2

aiometer

A Python concurrency scheduling library, compatible with asyncio and trio.
Python
252
star
3

asgi-lifespan

Programmatic startup/shutdown of ASGI apps.
Python
157
star
4

msgpack-asgi

Drop-in MessagePack support for ASGI applications and frameworks
Python
137
star
5

arel

Lightweight browser hot reload for Python ASGI web apps
Python
116
star
6

kafka-fraud-detector

🚨 Simple, self-contained fraud detection system built with Apache Kafka and Python
Python
77
star
7

httpx-sse

Consume Server-Sent Event (SSE) messages with HTTPX
Python
46
star
8

asgi-htmx

HTMX integration for ASGI applications
Python
39
star
9

starlette-auth-toolkit

Authentication backends and helpers for Starlette-based ASGI apps and frameworks
Python
32
star
10

www

Code for https://florimond.dev
Python
30
star
11

ddtrace-asgi

Unofficial Datadog tracing integration for ASGI apps and frameworks
Python
30
star
12

proxyx

[No maintenance intended] Proof of concept lightweight HTTP/1.1 proxy service built with ASGI and HTTPX.
Python
29
star
13

asgi-sitemaps

Sitemap generation for Python ASGI web apps
Python
20
star
14

asgi-caches

Server-side HTTP caching for ASGI applications, inspired by Django's cache framework
Python
18
star
15

pyboids

A boids flocking behaviour algorithm implementation in Python and Pygame
Python
14
star
16

python-in-browser

🐍πŸ›₯🌟 Running Python in the browser with Batavia and Starlette
Python
12
star
17

dataclasses-properties

🐍🀝 Reconciling Python's dataclasses and properties
Python
11
star
18

ng-courses

Fetch and display a list of courses by implementing the Model-Adapter Pattern
TypeScript
10
star
19

httpxprof

A tool for profiling HTTPX using cProfile and SnakeViz
Python
9
star
20

all-my-repos

Apply changes across all my repos using https://github.com/asottile/all-repos.
Python
7
star
21

personal

πŸ–₯ Personal blog frontend app
TypeScript
7
star
22

cs-ir

Implementation of an Information Retrieval System (IRS)
Jupyter Notebook
5
star
23

limier

Smart conversion and validation toolkit powered by type annotations
Python
4
star
24

paperiano

Paper + Piano (+ Computer Vision + Deep Learning) = Paperiano
Jupyter Notebook
4
star
25

personal-vue

β›° Vue remake of my personal blog frontend app. Built for learning purposes.
Vue
4
star
26

subscriptions-transport-ws-python

Pure Python, asynchronous, event-loop-agnostic implementation of the subscriptions-transport-ws protocol
Python
4
star
27

azure-pipelines-templates

Azure Pipelines templates for my repos
3
star
28

azp-python-example

Opinionated example Python package Azure Pipelines setup w/ TestPyPI publish on tags
Shell
2
star
29

roller-coaster-loops

Calculus applied to roller coaster physics
Python
2
star
30

datacenters-drought

Data visualization of datacenters location and water resources vs US West 2021 extreme droughts
Python
2
star
31

personal-api

⚑️ Personal blog API
Python
2
star
32

httpx-unixsocket-poc

POC third-party package for adding Unix Domain Socket support to HTTPX
Python
2
star
33

fetch-metadata-asgi

PoC ASGI middleware implementation of the Fetch Metadata specification
Python
2
star
34

pygame-assets

Lightweight asset management for Pygame
Python
2
star
35

ansible-learn

Learning Ansible by using it to configure a Nginx + Python + Uvicorn + Gunicorn + Supervisor deployment in a Vagrant VM.
Makefile
2
star
36

django-clean-media

Unused media files cleaning plugin for Django
Python
1
star
37

aragon

Rule-based streaming data cleansing application written in Python
Python
1
star
38

dots

Small game made with Love2D
Lua
1
star
39

pytest-unasync

Pytest plugin for async-to-sync test generation
Python
1
star
40

python-package-template

My opinionated cookiecutter template for Python packages.
Python
1
star
41

uptv

πŸ“Ί TV show alerting web app
Python
1
star
42

solitaire-rs

A Rust terminal UI (TUI) implementation of Solitaire
Rust
1
star
43

ddtrace-examples

Playing around with Datadog APM
Python
1
star
44

simulations

Fun mathematical simulations, using Python
Python
1
star
45

realchat

A web-based real-time chat room application made with Go, Svelte, and SocketIO.
Svelte
1
star
46

tower-defense

A cool Python game about defending a tower. All your base are belong to us.
Python
1
star
47

bocadillo-ws-test

Debugging WebSocket connection closures with Bocadillo and Uvicorn
Python
1
star