Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/ muffin Public

Muffin is a fast, simple and asyncronous web-framework for Python 3

Notifications You must be signed in to change notification settings

klen/muffin

Repository files navigation

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

About

Muffin is a fast, simple and asyncronous web-framework for Python 3

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 13

AltStyle によって変換されたページ (->オリジナル) /