.. image:: https://raw.github.com/klen/muffin/develop/docs/static/logo-h200.png
:height: 100px
**Muffin** – fast, lightweight, and asynchronous ASGI_ web framework for Python 3.10+.
.. image:: https://github.com/klen/muffin/workflows/tests/badge.svg
:target: https://github.com/klen/muffin/actions
:alt: Tests Status
.. image:: https://github.com/klen/muffin/workflows/docs/badge.svg
:target: https://klen.github.io/muffin
:alt: Documentation Status
.. image:: https://img.shields.io/pypi/v/muffin
:target: https://pypi.org/project/muffin/
:alt: PYPI Version
.. image:: https://img.shields.io/pypi/pyversions/muffin
:target: https://pypi.org/project/muffin/
:alt: Python Versions
----------
.. _description:
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
------------
- ASGI_ compatible
- Competitive performance ([Benchmarks](http://klen.github.io/py-frameworks-bench/))
- Supports Asyncio_, Trio_, and Curio_
- Multiple response types: text, HTML, JSON, streams, files, SSE, WebSockets
- First-class plugin system for templating, databases, auth, and more
.. _installation:
Installation
------------
Muffin requires **Python 3.10 or newer**. We recommend using the latest stable Python.
Install via pip:
.. code-block:: console
$ pip install muffin
For the standard installation with `gunicorn`, `uvicorn`, `uvloop`, `httptools`:
.. code-block:: console
$ pip install muffin[standard]
Dependencies
~~~~~~~~~~~~
These packages will be installed automatically:
* `ASGI-Tools`_ – ASGI toolkit
* `Modconfig`_ – hierarchical configuration manager
.. _ASGI-Tools: https://klen.github.io/asgi-tools/
.. _Modconfig: https://pypi.org/project/modconfig/
.. _quickstart:
Quickstart
----------
Create a simple "Hello User" app:
.. code-block:: python
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:
.. code-block:: console
$ uvicorn example:app
Visit http://localhost:8000 or http://localhost:8000/hello/username in your browser.
.. _plugins:
Plugins
-------
Muffin has a rich ecosystem of plugins:
- [`muffin-jinja2`](https://github.com/klen/muffin-jinja2) – Jinja2 templates (asyncio/trio/curio)
- [`muffin-session`](https://github.com/klen/muffin-session) – Signed cookie-based HTTP sessions
- [`muffin-oauth`](https://github.com/klen/muffin-oauth) – OAuth integration
- [`muffin-sentry`](https://github.com/klen/muffin-sentry) – Sentry error tracking
- [`muffin-peewee`](https://github.com/klen/muffin-peewee-aio) – Peewee ORM integration
- [`muffin-babel`](https://github.com/klen/muffin-babel) – i18n support
- [`muffin-databases`](https://github.com/klen/muffin-databases) – SQL database support
- [`muffin-mongo`](https://github.com/klen/muffin-mongo) – MongoDB integration
- [`muffin-rest`](https://github.com/klen/muffin-rest) – REST API utilities
- [`muffin-redis`](https://github.com/klen/muffin-redis) – Redis integration
- [`muffin-admin`](https://github.com/klen/muffin-admin) – Auto-generated admin UI
- [`muffin-prometheus`](https://github.com/klen/muffin-prometheus) – Prometheus metrics exporter
See each repo for usage and installation instructions.
.. _benchmarks:
Benchmarks
----------
Performance comparisons are available at: http://klen.github.io/py-frameworks-bench/
.. _links:
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)**
* `Kirill Klenov <https://github.com/klen>`_
**Muffin < 0.40 (based on AIOHTTP_)**
* `Kirill Klenov <https://github.com/klen>`_
* `Andrew Grigorev <https://github.com/ei-grad>`_
* `Diego Garcia <https://github.com/drgarcia1986>`_
.. _AIOHTTP: https://docs.aiohttp.org/en/stable/
.. _ASGI: https://asgi.readthedocs.io/en/latest/
.. _Asyncio: https://docs.python.org/3/library/asyncio.html
.. _Curio: https://curio.readthedocs.io/en/latest/
.. _Python: http://python.org
.. _Trio: https://trio.readthedocs.io/en/stable/index.html
.. _MIT license: http://opensource.org/licenses/MIT
Raw data
{
"_id": null,
"home_page": "https://github.com/klen/muffin",
"name": "muffin",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": "asgi, web, web framework, asyncio, trio, curio",
"author": "Kirill Klenov",
"author_email": "horneds@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/d4/6d/0ec511217e4a8f6d2e71bc3e63930625b1be9986cdc835a652fa86e42359/muffin-1.1.1.tar.gz",
"platform": null,
"description": ".. image:: https://raw.github.com/klen/muffin/develop/docs/static/logo-h200.png\n :height: 100px\n\n**Muffin** \u2013 fast, lightweight, and asynchronous ASGI_ web framework for Python 3.10+.\n\n.. image:: https://github.com/klen/muffin/workflows/tests/badge.svg\n :target: https://github.com/klen/muffin/actions\n :alt: Tests Status\n\n.. image:: https://github.com/klen/muffin/workflows/docs/badge.svg\n :target: https://klen.github.io/muffin\n :alt: Documentation Status\n\n.. image:: https://img.shields.io/pypi/v/muffin\n :target: https://pypi.org/project/muffin/\n :alt: PYPI Version\n\n.. image:: https://img.shields.io/pypi/pyversions/muffin\n :target: https://pypi.org/project/muffin/\n :alt: Python Versions\n\n----------\n\n.. _description:\n\nWhy Muffin?\n-----------\n\nMuffin 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.\n\nKey Features\n------------\n\n- ASGI_ compatible\n- Competitive performance ([Benchmarks](http://klen.github.io/py-frameworks-bench/))\n- Supports Asyncio_, Trio_, and Curio_\n- Multiple response types: text, HTML, JSON, streams, files, SSE, WebSockets\n- First-class plugin system for templating, databases, auth, and more\n\n.. _installation:\n\nInstallation\n------------\n\nMuffin requires **Python 3.10 or newer**. We recommend using the latest stable Python.\n\nInstall via pip:\n\n.. code-block:: console\n\n $ pip install muffin\n\nFor the standard installation with `gunicorn`, `uvicorn`, `uvloop`, `httptools`:\n\n.. code-block:: console\n\n $ pip install muffin[standard]\n\nDependencies\n~~~~~~~~~~~~\n\nThese packages will be installed automatically:\n\n* `ASGI-Tools`_ \u2013 ASGI toolkit\n* `Modconfig`_ \u2013 hierarchical configuration manager\n\n.. _ASGI-Tools: https://klen.github.io/asgi-tools/\n.. _Modconfig: https://pypi.org/project/modconfig/\n\n.. _quickstart:\n\nQuickstart\n----------\n\nCreate a simple \"Hello User\" app:\n\n.. code-block:: python\n\n import muffin\n\n app = muffin.Application()\n\n @app.route('/', '/hello/{name}')\n async def hello(request):\n name = request.path_params.get('name', 'world')\n return f'Hello, {name.title()}!'\n\nSave this as `example.py` and run:\n\n.. code-block:: console\n\n $ uvicorn example:app\n\nVisit http://localhost:8000 or http://localhost:8000/hello/username in your browser.\n\n.. _plugins:\n\nPlugins\n-------\n\nMuffin has a rich ecosystem of plugins:\n\n- [`muffin-jinja2`](https://github.com/klen/muffin-jinja2) \u2013 Jinja2 templates (asyncio/trio/curio)\n- [`muffin-session`](https://github.com/klen/muffin-session) \u2013 Signed cookie-based HTTP sessions\n- [`muffin-oauth`](https://github.com/klen/muffin-oauth) \u2013 OAuth integration\n- [`muffin-sentry`](https://github.com/klen/muffin-sentry) \u2013 Sentry error tracking\n- [`muffin-peewee`](https://github.com/klen/muffin-peewee-aio) \u2013 Peewee ORM integration\n- [`muffin-babel`](https://github.com/klen/muffin-babel) \u2013 i18n support\n- [`muffin-databases`](https://github.com/klen/muffin-databases) \u2013 SQL database support\n- [`muffin-mongo`](https://github.com/klen/muffin-mongo) \u2013 MongoDB integration\n- [`muffin-rest`](https://github.com/klen/muffin-rest) \u2013 REST API utilities\n- [`muffin-redis`](https://github.com/klen/muffin-redis) \u2013 Redis integration\n- [`muffin-admin`](https://github.com/klen/muffin-admin) \u2013 Auto-generated admin UI\n- [`muffin-prometheus`](https://github.com/klen/muffin-prometheus) \u2013 Prometheus metrics exporter\n\nSee each repo for usage and installation instructions.\n\n.. _benchmarks:\n\nBenchmarks\n----------\n\nPerformance comparisons are available at: http://klen.github.io/py-frameworks-bench/\n\n.. _links:\n\nBug tracker\n-----------\n\nFound a bug or have a feature request? Please open an issue at:\nhttps://github.com/klen/muffin/issues\n\nContributing\n------------\n\nContributions are welcome! Please see [CONTRIBUTING.md](https://github.com/klen/muffin/blob/develop/CONTRIBUTING.md) for guidelines.\n\nLicense\n-------\n\nMuffin is licensed under the MIT license.\n\n----------\n\nCredits\n-------\n\n**Muffin > 0.40 (completely rewritten on ASGI)**\n\n* `Kirill Klenov <https://github.com/klen>`_\n\n**Muffin < 0.40 (based on AIOHTTP_)**\n\n* `Kirill Klenov <https://github.com/klen>`_\n* `Andrew Grigorev <https://github.com/ei-grad>`_\n* `Diego Garcia <https://github.com/drgarcia1986>`_\n\n.. _AIOHTTP: https://docs.aiohttp.org/en/stable/\n.. _ASGI: https://asgi.readthedocs.io/en/latest/\n.. _Asyncio: https://docs.python.org/3/library/asyncio.html\n.. _Curio: https://curio.readthedocs.io/en/latest/\n.. _Python: http://python.org\n.. _Trio: https://trio.readthedocs.io/en/stable/index.html\n.. _MIT license: http://opensource.org/licenses/MIT\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Muffin is a fast, simple and asyncronous web-framework for Python 3 (asyncio, trio, curio)",
"version": "1.1.1",
"project_urls": {
"Documentation": "https://klen.github.io/muffin",
"Homepage": "https://github.com/klen/muffin",
"Repository": "https://github.com/klen/muffin",
"changelog": "https://raw.githubusercontent.com/klen/muffin/master/CHANGELOG.md"
},
"split_keywords": [
"asgi",
" web",
" web framework",
" asyncio",
" trio",
" curio"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6f4d310bb557701c0876351cb298a14de73c8dcc688194139da60a0994a3d9af",
"md5": "2518b47cdc159619403648aac9fc6b52",
"sha256": "145276c7b801cf48f63a0a388aee1232c38cb4922cc4b6c661bd0ada2a75175e"
},
"downloads": -1,
"filename": "muffin-1.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2518b47cdc159619403648aac9fc6b52",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 15386,
"upload_time": "2025-07-17T14:39:33",
"upload_time_iso_8601": "2025-07-17T14:39:33.189382Z",
"url": "https://files.pythonhosted.org/packages/6f/4d/310bb557701c0876351cb298a14de73c8dcc688194139da60a0994a3d9af/muffin-1.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d46d0ec511217e4a8f6d2e71bc3e63930625b1be9986cdc835a652fa86e42359",
"md5": "703c55f0a1fb9fe6f0810a9d9cb37cfa",
"sha256": "bea265168f25f57b13509cb8ea39b6c750413c3832cbb6a3bd19551e421ba283"
},
"downloads": -1,
"filename": "muffin-1.1.1.tar.gz",
"has_sig": false,
"md5_digest": "703c55f0a1fb9fe6f0810a9d9cb37cfa",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 13824,
"upload_time": "2025-07-17T14:39:34",
"upload_time_iso_8601": "2025-07-17T14:39:34.716047Z",
"url": "https://files.pythonhosted.org/packages/d4/6d/0ec511217e4a8f6d2e71bc3e63930625b1be9986cdc835a652fa86e42359/muffin-1.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-17 14:39:34",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "klen",
"github_project": "muffin",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "muffin"
}