APIFlask is a lightweight web API framework built on Flask. It provides a structured approach to developing HTTP APIs while retaining compatibility with Flask’s application model, extensions and established development practices.
The framework addresses common requirements encountered when building APIs, particularly the relationship between incoming data, application logic and responses returned to clients. Developers define their endpoints using familiar Flask-style route decorators and describe the expected data through schemas.
APIFlask is designed to work with existing Flask applications as well as new projects. Its additional facilities reduce the amount of repetitive code required for handling structured requests and responses, making it suitable for REST APIs, backend services and applications that expose programmatic interfaces.
This is free and open source software.
Key Features
- Request validation and deserialization using schemas defined with marshmallow or Pydantic.
- Response serialization and formatting with configurable output schemas.
- Automatic generation of OpenAPI specifications from application endpoints and schemas.
- Interactive API documentation generated from the application’s OpenAPI definition.
- Convenient route decorators for common HTTP methods including GET, POST, PUT, PATCH and DELETE.
- Schema-based handling of JSON request bodies, query parameters and other input sources.
- Authentication support through Flask-HTTPAuth, including HTTP Basic and token authentication.
- Consistent JSON error responses for HTTP errors and validation failures.
- APIBlueprint support for organising API endpoints into reusable application components.
- Customisable API documentation, endpoint metadata and OpenAPI configuration.
- Compatibility with Flask extensions, middleware and application patterns.
- Database-independent design, allowing applications to use their preferred ORM or ODM.
Website: github.com/apiflask/apiflask
Support:
Developer: Grey Li
License: MIT License
APIFlask is written in Python. Learn Python with our recommended free books and free tutorials.
Related Software
| Best Python Micro Frameworks | |
|---|---|
| Flask | Hugely popular microframework based on Werkzeug and Jinja2 |
| FastAPI | Web framework for building APIs |
| Starlette | Lightweight ASGI framework/toolkit |
| aiohttp | Asynchronous HTTP client/server for asyncio and Python |
| Sanic | Web server and web framework |
| Falcon | Build cloud APIs, smart proxies, and app backends |
| Quart | Web microframework based on Asyncio |
| Pyramid | Start small, finish big, stay finished framework |
| Bottle | Fast, simple and lightweight WSGI micro web framework |
| Chalice | Python Serverless Microframework for AWS |
| CherryPy | Mature, minimalist, Python object-oriented web framework |
| TurboGears | Hybrid framework acting as a Full Stack framework or Microframework |
| Quixote | Aimed at sites where complex programming is required |
| Klein | Micro-framework for developing production-ready web services with Python |
| circuits | Lightweight event driven application framework |
| Clastic | Functional web framework |
| Hug | Make developing Python driven APIs as simple as possible |
| MicroPie | Ultra-micro ASGI Python web framework |
| Litestar | Powerful, lightweight, and flexible ASGI framework |
| BlackSheep | Asynchronous Python web framework |
| Robyn | Python web framework designed for high performance |
| Microdot | Small web framework for Python and MicroPython |
Read our verdict in the software roundup.
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. |


Please read our Comment Policy before commenting.