{"id":13502152,"url":"https://github.com/klen/muffin","last_synced_at":"2025-06-17T10:13:26.833Z","repository":{"id":26785398,"uuid":"30243627","full_name":"klen/muffin","owner":"klen","description":"Muffin is a fast, simple and asyncronous web-framework for Python 3","archived":false,"fork":false,"pushed_at":"2024-07-31T16:34:56.000Z","size":9143,"stargazers_count":674,"open_issues_count":1,"forks_count":24,"subscribers_count":29,"default_branch":"develop","last_synced_at":"2025-03-29T10:35:11.022Z","etag":null,"topics":["asgi","asyncio","curio","muffin","python","trio","webframework"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/klen.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":".github/contributing.md","funding":null,"license":null,"code_of_conduct":".github/code_of_conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/codeowners","security":".github/security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-02-03T13:21:04.000Z","updated_at":"2025-03-18T21:49:02.000Z","dependencies_parsed_at":"2024-10-31T21:31:37.359Z","dependency_job_id":null,"html_url":"https://github.com/klen/muffin","commit_stats":{"total_commits":1038,"total_committers":13,"mean_commits":79.84615384615384,"dds":0.06647398843930641,"last_synced_commit":"6d5aab7e713b0553deae370f518a3f358dc8ddd9"},"previous_names":[],"tags_count":387,"template":false,"template_full_name":null,"purl":"pkg:github/klen/muffin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klen%2Fmuffin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klen%2Fmuffin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klen%2Fmuffin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klen%2Fmuffin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/klen","download_url":"https://codeload.github.com/klen/muffin/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klen%2Fmuffin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260336372,"owners_count":22993742,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asgi","asyncio","curio","muffin","python","trio","webframework"],"created_at":"2024-07-31T22:02:03.796Z","updated_at":"2025-06-17T10:13:21.817Z","avatar_url":"https://github.com/klen.png","language":"Python","readme":".. image:: https://raw.github.com/klen/muffin/develop/docs/static/logo-h200.png\n   :height: 100px\n\n.. _description:\n\n**Muffin** -- is a fast, lightweight and asyncronous ASGI_ web-framework for Python_ 3.\n\n.. _badges:\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.. _features:\n\nFeatures\n--------\n\n- ASGI_ compatible;\n- `Competitive Performance \u003chttp://klen.github.io/py-frameworks-bench/\u003e`_;\n- All async python libraries are supported (Asyncio_, Trio_, Curio_);\n- Send HTTP (text, html, json, stream, file, http errors) responses\n- Support WebSockets, Server Side Events\n\n.. _documentation:\n\n**Docs are available at https://klen.github.io/muffin/. Pull requests\nwith documentation enhancements and/or fixes are awesome and most welcome.**\n\n.. _contents:\n\n.. contents::\n\n.. _requirements:\n\n.. _installation:\n\nInstallation\n------------\n\nWe recommend using the latest version of Python. The library supports Python\n3.8 and newer (PyPy-3.9+ are supported too).\n\nMuffin should be installed using pip: ::\n\n    pip install muffin\n\nThe command will install minimal configuration.\n\nTo install Muffin with `gunicorn`, `uvicorn`, `uvloop`, `httptools` use the\ncommand:\n\n.. code-block:: console\n\n  $ pip install muffin[standard]\n\nDependencies\n````````````\n\nThese distributions will be installed automatically when installing **Muffin**.\n\n* `ASGI-Tools`_ - ASGI_ Toolkit\n* `Modconfig`_  - Simple hierarchic 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\nExample \"Hello User\" with the Muffin:\n\n.. code-block:: python\n\n    import muffin\n\n\n    app = muffin.Application()\n\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\n\nWhat did that code do?\n\n1. First we imported the ``muffin.Application`` class.  An instance of\n   this class will be our application.\n2. Next we create an instance of this class.\n3. We then use the ``muffin.Application.route`` decorator to tell Muffin\n   what URLs should trigger our handler function.\n4. The function returns the message we want to display in the user's browser.\n\n\nSave the script as `example.py` and run it using Uvicorn (or another ASGI_ server): ::\n\n    $ uvicorn example:app\n\nOpen http://localhost:8000, http://localhost:8000/hello/username in your browser. Enjoy!\n\n.. TODO: Finish the general example\n.. For a more complete example, see https://github.com/klen/muffin-example\n\n.. _plugins:\n\nPlugins overview\n----------------\n\nThe list of some Muffin plugins (please make PR if you want to provide more):\n\n`Muffin-Jinja2  \u003chttps://github.com/klen/muffin-jinja2\u003e`_\n``````````````````````````````````````````````````````````\n\n`Jinja2 \u003chttps://jinja.palletsprojects.com/en/2.11.x/\u003e`_ templates (asyncio/trio/curio)\n\n.. image:: https://github.com/klen/muffin-jinja2/workflows/tests/badge.svg\n    :target: https://github.com/klen/muffin-jinja2/actions\n    :alt: Tests Status\n\n.. image:: https://img.shields.io/pypi/v/muffin-jinja2\n    :target: https://pypi.org/project/muffin-jinja2/\n    :alt: PYPI Version\n\n\n\n`Muffin-Session \u003chttps://github.com/klen/muffin-session\u003e`_\n```````````````````````````````````````````````````````````\n\nSigned Cookie-Based HTTP sessions (asyncio/trio/curio)\n\n.. image:: https://github.com/klen/muffin-session/workflows/tests/badge.svg\n    :target: https://github.com/klen/muffin-session/actions\n    :alt: Tests Status\n\n.. image:: https://img.shields.io/pypi/v/muffin-session\n    :target: https://pypi.org/project/muffin-session/\n    :alt: PYPI Version\n\n\n`Muffin-OAuth \u003chttps://github.com/klen/muffin-oauth\u003e`_\n```````````````````````````````````````````````````````\n\nWork with OAuth (authorization, resources loading) (asyncio/trio/curio)\n\n.. image:: https://github.com/klen/muffin-oauth/workflows/tests/badge.svg\n    :target: https://github.com/klen/muffin-oauth/actions\n    :alt: Tests Status\n\n.. image:: https://img.shields.io/pypi/v/muffin-oauth\n    :target: https://pypi.org/project/muffin-oauth/\n    :alt: PYPI Version\n\n\n`Muffin-Sentry  \u003chttps://github.com/klen/muffin-sentry\u003e`_\n`````````````````````````````````````````````````````````\n\nSentry integration (asyncio/trio/curio)\n\n.. image:: https://github.com/klen/muffin-sentry/workflows/tests/badge.svg\n    :target: https://github.com/klen/muffin-sentry/actions\n    :alt: Tests Status\n\n.. image:: https://img.shields.io/pypi/v/muffin-sentry\n    :target: https://pypi.org/project/muffin-sentry/\n    :alt: PYPI Version\n\n\n`Muffin-Peewee  \u003chttps://github.com/klen/muffin-peewee-aio\u003e`_\n`````````````````````````````````````````````````````````````\n\nPeewee support (SQL, ORM) (asyncio/trio/curio)\n\n.. image:: https://github.com/klen/muffin-peewee-aio/workflows/tests/badge.svg\n    :target: https://github.com/klen/muffin-peewee/actions\n    :alt: Tests Status\n\n.. image:: https://img.shields.io/pypi/v/muffin-peewee-aio\n    :target: https://pypi.org/project/muffin-peewee-aio/\n    :alt: PYPI Version\n\n\n`Muffin-Babel   \u003chttps://github.com/klen/muffin-babel\u003e`_\n````````````````````````````````````````````````````````\n\nLocalization support (asyncio/trio/curio)\n\n.. image:: https://github.com/klen/muffin-babel/workflows/tests/badge.svg\n    :target: https://github.com/klen/muffin-babel/actions\n    :alt: Tests Status\n\n.. image:: https://img.shields.io/pypi/v/muffin-babel\n    :target: https://pypi.org/project/muffin-babel/\n    :alt: PYPI Version\n\n\n`Muffin-Databases   \u003chttps://github.com/klen/muffin-databases\u003e`_\n`````````````````````````````````````````````````````````````````\n\nWork with SQL databases (asyncio only)\n\n.. image:: https://github.com/klen/muffin-databases/workflows/tests/badge.svg\n    :target: https://github.com/klen/muffin-databases/actions\n    :alt: Tests Status\n\n.. image:: https://img.shields.io/pypi/v/muffin-databases\n    :target: https://pypi.org/project/muffin-databases/\n    :alt: PYPI Version\n\n\n`Muffin-Mongo   \u003chttps://github.com/klen/muffin-mongo\u003e`_\n`````````````````````````````````````````````````````````\n\nWork with Mongo DB (asyncio only)\n\n.. image:: https://github.com/klen/muffin-mongo/workflows/tests/badge.svg\n    :target: https://github.com/klen/muffin-mongo/actions\n    :alt: Tests Status\n\n.. image:: https://img.shields.io/pypi/v/muffin-mongo\n    :target: https://pypi.org/project/muffin-mongo/\n    :alt: PYPI Version\n\n`Muffin-REST    \u003chttps://github.com/klen/muffin-rest\u003e`_\n````````````````````````````````````````````````````````\n\nThe package provides enhanced support for writing REST APIs (asyncio/trio/curio)\n\n.. image:: https://github.com/klen/muffin-rest/workflows/tests/badge.svg\n    :target: https://github.com/klen/muffin-rest/actions\n    :alt: Tests Status\n\n.. image:: https://img.shields.io/pypi/v/muffin-rest\n    :target: https://pypi.org/project/muffin-rest/\n    :alt: PYPI Version\n\n`Muffin-Redis   \u003chttps://github.com/klen/muffin-redis\u003e`_\n`````````````````````````````````````````````````````````\n\nRedis support\n\n.. image:: https://github.com/klen/muffin-redis/workflows/tests/badge.svg\n    :target: https://github.com/klen/muffin-redis/actions\n    :alt: Tests Status\n\n.. image:: https://img.shields.io/pypi/v/muffin-redis\n    :target: https://pypi.org/project/muffin-redis/\n    :alt: PYPI Version\n\n`Muffin-Admin   \u003chttps://github.com/klen/muffin-admin\u003e`_\n`````````````````````````````````````````````````````````\n\nAutomatically build Admin UI\n\n.. image:: https://github.com/klen/muffin-admin/workflows/tests/badge.svg\n    :target: https://github.com/klen/muffin-admin/actions\n    :alt: Tests Status\n\n.. image:: https://img.shields.io/pypi/v/muffin-admin\n    :target: https://pypi.org/project/muffin-admin/\n    :alt: PYPI Version\n\n`Muffin-Prometheus   \u003chttps://github.com/klen/muffin-prometheus\u003e`_\n```````````````````````````````````````````````````````````````````\n\nPrometheus metrics exporter\n\n.. image:: https://github.com/klen/muffin-prometheus/workflows/tests/badge.svg\n    :target: https://github.com/klen/muffin-prometheus/actions\n    :alt: Tests Status\n\n.. image:: https://img.shields.io/pypi/v/muffin-prometheus\n    :target: https://pypi.org/project/muffin-prometheus/\n    :alt: PYPI Version\n\n.. _benchmarks:\n\nBenchmarks\n-----------\n\nYou could find some tests here: http://klen.github.io/py-frameworks-bench/\n\n.. _bugtracker:\n\nBug tracker\n-----------\n\nIf you have any suggestions, bug reports or\nannoyances please report them to the issue tracker\nat https://github.com/klen/muffin/issues\n\n.. _contributing:\n\nContributing\n------------\n\nDevelopment of The Muffin happens at: https://github.com/klen/muffin\n\n\nContributors\n-------------\n\nMuffin \u003e 0.40 (completelly rewriten from scratch)\n\n* `Kirill Klenov \u003chttps://github.com/klen\u003e`_\n\nMuffin \u003c 0.40 (based on AIOHTTP_)\n\n* `Kirill Klenov \u003chttps://github.com/klen\u003e`_\n* `Andrew Grigorev \u003chttps://github.com/ei-grad\u003e`_\n* `Diego Garcia \u003chttps://github.com/drgarcia1986\u003e`_\n\n.. _license:\n\nLicense\n-------\n\nLicensed under a `MIT license`_.\n\n.. _links:\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.. _MIT license: http://opensource.org/licenses/MIT\n.. _Python: http://python.org\n.. _Trio: https://trio.readthedocs.io/en/stable/index.html\n.. _klen: https://github.com/klen\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklen%2Fmuffin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fklen%2Fmuffin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklen%2Fmuffin/lists"}