Framework

Muffin – lightweight asynchronous ASGI web microframework

Muffin is a lightweight asynchronous web framework designed for building web applications and services around the ASGI standard. It combines a straightforward application structure with the ability to handle asynchronous requests and long-lived connections.

Applications are organised around routes that associate URL patterns with request handlers. Each handler receives a request object and returns content that Muffin converts into an appropriate HTTP response. This makes it possible to build small services without adopting an elaborate application architecture.

The framework supports several asynchronous execution libraries and can be extended through middleware and plugins. Developers can introduce additional functionality as their applications grow, including database integration, authentication, sessions and template rendering.

This is free and open source software.

Key Features

  • ASGI-compatible framework supporting asynchronous HTTP applications and services.
  • Supports Asyncio, Trio and Curio asynchronous execution libraries.
  • Flexible URL routing with dynamic path parameters, type converters and regular expressions.
  • Multiple response formats including HTML, JSON, text, file downloads, streaming responses and Server-Sent Events.
  • WebSocket support for bidirectional communication between clients and servers.
  • Middleware system for intercepting and processing requests and responses.
  • Plugin ecosystem covering Jinja2 templates, databases, OAuth authentication, sessions, internationalisation and monitoring.
  • Supports nested applications and host-based routing for organising larger projects.
  • Background tasks can be scheduled to run after an HTTP response has been sent.
  • Built-in facilities for serving static files, processing uploads and handling redirects and HTTP errors.
  • Test client and pytest integration for testing application behaviour, including WebSocket connections.
  • Configuration management with support for environment variables and plugin settings.

Website: github.com/klen/muffin
Support:
Developer: Kirill Klenov
License: MIT License

Muffin is written in Python. Learn Python with our recommended free books and free tutorials.


Related Software

Best Python Micro Frameworks
FlaskHugely popular microframework based on Werkzeug and Jinja2
FastAPIWeb framework for building APIs
StarletteLightweight ASGI framework/toolkit
aiohttpAsynchronous HTTP client/server for asyncio and Python
SanicWeb server and web framework
FalconBuild cloud APIs, smart proxies, and app backends
QuartWeb microframework based on Asyncio
PyramidStart small, finish big, stay finished framework
BottleFast, simple and lightweight WSGI micro web framework
ChalicePython Serverless Microframework for AWS
CherryPyMature, minimalist, Python object-oriented web framework
TurboGearsHybrid framework acting as a Full Stack framework or Microframework
QuixoteAimed at sites where complex programming is required
KleinMicro-framework for developing production-ready web services with Python
circuitsLightweight event driven application framework
ClasticFunctional web framework
HugMake developing Python driven APIs as simple as possible
MicroPieUltra-micro ASGI Python web framework
LitestarPowerful, lightweight, and flexible ASGI framework
BlackSheepAsynchronous Python web framework
RobynPython web framework designed for high performance
MicrodotSmall web framework for Python and MicroPython

Read our verdict in the software roundup.


Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted