Skip to main content
https://raw.github.com/klen/muffin/develop/docs/static/logo-h200.png

Muffin – fast, lightweight, and asynchronous ASGI web framework for Python 3.11+.

Tests Status Documentation Status PYPI Version Python Versions

Why Muffin?

Muffin combines the simplicity of microframeworks with native ASGI performance, supporting multiple async libraries (Asyncio, Trio, Curio) out of the box. Its rich plugin ecosystem makes building modern web applications pleasant and efficient.

Key Features

Installation

Muffin requires Python 3.11 or newer. We recommend using the latest stable Python.

Install via pip:

$ pip install muffin

For the standard installation with gunicorn, uvicorn, uvloop, httptools:

$ pip install muffin[standard]

Dependencies

These packages will be installed automatically:

Quickstart

Create a simple “Hello User” app:

import muffin

app = muffin.Application()

@app.route('/', '/hello/{name}')
async def hello(request):
    name = request.path_params.get('name', 'world')
    return f'Hello, {name.title()}!'

Save this as example.py and run:

$ uvicorn example:app

Visit http://localhost:8000 or http://localhost:8000/hello/username in your browser.

Plugins

Muffin has a rich ecosystem of plugins:

See each repo for usage and installation instructions.

Benchmarks

Performance comparisons are available at: http://klen.github.io/py-frameworks-bench/

Bug tracker

Found a bug or have a feature request? Please open an issue at: https://github.com/klen/muffin/issues

Contributing

Contributions are welcome! Please see [CONTRIBUTING.md](https://github.com/klen/muffin/blob/develop/CONTRIBUTING.md) for guidelines.

License

Muffin is licensed under the MIT license.


Credits

Muffin > 0.40 (completely rewritten on ASGI)

Muffin < 0.40 (based on AIOHTTP_)

Metadata

Release files for muffin 3.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for muffin 3.0.3
File Size Uploaded Provenance
muffin-3.0.3.tar.gz 12.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for muffin 3.0.3
File Interpreter ABI Platform
muffin-3.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 28.8 kB

Release files / muffin-3.0.3.tar.gz

Download URL muffin-3.0.3.tar.gz
Size 12.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6e076d8c47a45855a2f3006466770e9a734e309fadb40906d3b6257cedd42543
BLAKE2b-256 checksum
How to use checksums
f4eb6499e74c1b3d7604941e2b03f98a6d9cc73135c7c8a2dd56f222c07720dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / muffin-3.0.3-py3-none-any.whl

Download URL muffin-3.0.3-py3-none-any.whl
Size 15.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
984c5d86b435de2cc3eb2537505e8fe3d9f9b59dca0484c7c0945ff5c6090d0a
BLAKE2b-256 checksum
How to use checksums
145d62d8899a25d22b3059663945996b184abb59a46efc9aed40d8014bfb5778
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for muffin 3.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.0.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page