Framework

APIFlask – lightweight framework for building web APIs

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