# django/asgiref

ASGI specification and utilities

Repository: https://github.com/django/asgiref
Canonical: https://ross.abutalabs.com/products/asgiref
Homepage: https://asgi.readthedocs.io/en/latest/
Language: Python
License: BSD-3-Clause
License Family: permissive
Last push: 2026-08-10T09:04:53+00:00

## Health v2 (maintenance only)
Score: 76/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 97, release rhythm 35, longevity 100
- inputs: {"age_days": 3906, "days_push": 23, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1630, forks 258 (observed 2026-08-28T04:05:13.986597+00:00)

## What it is
asgiref is the reference library for the ASGI (Asynchronous Server Gateway Interface) specification, providing base utilities for Python async web apps and servers. It includes sync-to-async and async-to-sync function wrappers, a WSGI-to-ASGI adapter, server base classes, and a thread/task-aware threadlocal replacement.

## Use cases
- call async functions from synchronous code in python
- run sync django views inside an asgi server
- adapt a wsgi app to run on an asgi server
- write a stateless async server that consumes external sockets
- share thread-local state across asyncio tasks and threadpools
- bridge sync and async code during a gradual asyncio migration

## When to avoid
- you need a full web framework or production ASGI server rather than base utilities
- your project is purely synchronous with no asyncio involvement
- you need HTTP routing, templating, or ORM features - asgiref provides none

## Facets
- artifact type: library
- maturity: stable
- function: middleware, http-server, concurrency
- domain: web-development, backend, developer-tools
- platform: python, cross-platform
- tags: asgi, asyncio, wsgi, sync-async-bridging, web-servers

## Member repositories
- django/asgiref (main) score 76

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:13.986597+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:47:55.374585+00:00, confidence not recorded.
  - readme: https://github.com/django/asgiref (fetched 2026-08-28T04:05:13.986597+00:00, sha 3e4855a33cab)
  - registry_pypi: https://pypi.org/pypi/asgiref/json (fetched 2026-08-29T11:21:08.629126+00:00, sha ac3c511f7563)
- Data as of 2026-08-30T08:39:29.467469+00:00.
