Skip to content
Proyek

Tentang

Muffin adalah framework web yang cepat, sederhana, dan asinkron untuk Python 3.

Pengembangan web dan aplikasi

Cara angka ini diukur

Pertumbuhan bintang terukur

dalam 24 jam
0
dalam 7 hari
0
dalam 15 hari
+1
dalam 1 bulan
Mengumpulkan riwayat

Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.

README.md

Asli

Muffin

Muffin

Fast, lightweight, asynchronous ASGI web framework for Python 3.11+. Documentation: https://klen.github.io/muffin

Tests Docs PyPI 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 plugin ecosystem covers templating, databases, auth and more.

Key features:

  • ASGI compatible
  • Competitive performance
  • Supports Asyncio, Trio and Curio
  • Multiple response types: text, HTML, JSON, streams, files, SSE, WebSockets
  • First-class plugin system

Installation

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

$ pip install muffin

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

$ pip install muffin[standard]

Dependencies 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

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.

License

Muffin is licensed under the MIT license.

Credits

Muffin > 0.40 (completely rewritten on ASGI)

Muffin < 0.40 (based on AIOHTTP)

Jelajahi proyek terkait

Memuat…