Skip to main content

Muffin is a fast, simple and asyncronous web-framework for Python 3 (asyncio, trio, curio)

Project description

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

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

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.10 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_)

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

muffin-1.9.0.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

muffin-1.9.0-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file muffin-1.9.0.tar.gz.

File metadata

  • Download URL: muffin-1.9.0.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for muffin-1.9.0.tar.gz
Algorithm Hash digest
SHA256 c1c22b986f694edbfd8c2ee79c78b31e59d78facf253c9711c8e43113b75be3e
MD5 a6e15e437e76044ec87cfc0478d7affd
BLAKE2b-256 7771883d11b964472cb694e0e37374471dd6af43b8cceeff3845a56caa9be207

See more details on using hashes here.

File details

Details for the file muffin-1.9.0-py3-none-any.whl.

File metadata

  • Download URL: muffin-1.9.0-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for muffin-1.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8e6d872b5ec93807e9ae28c47053954d572f4c47d8ebb0fabe5ef52956db9e2d
MD5 2a5f41f84e34fe76f1e2aba0b7eaa218
BLAKE2b-256 cd98adde924dbec761d9ce270657be25c4e61807d35c754109667d61c9b3c855

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page