APIFlask is a lightweight Python web API framework based on Flask and marshmallow-code projects

Overview

APIFlask

Build status codecov

APIFlask is a lightweight Python web API framework based on Flask and marshmallow-code projects. It's easy to use, highly customizable, ORM/ODM-agnostic, and 100% compatible with the Flask ecosystem. It starts as a fork of APIFairy and is inspired by flask-smorest and FastAPI (see Comparison and Motivations for the comparison between these projects).

With APIFlask, you will have:

  • More sugars for view function (@input(), @output(), @app.get(), @app.post() and more)
  • Automatic request validation and deserialization (with webargs)
  • Automatic response formatting and serialization (with marshmallow)
  • Automatic OpenAPI Specification (OAS, formerly Swagger Specification) document generation (with apispec)
  • Automatic interactive API documentation (with Swagger UI and Redoc)
  • API authentication support (with Flask-HTTPAuth)
  • Automatic JSON response for HTTP errors

Requirements

  • Python 3.7+
  • Flask 1.1.0+

Installation

For Linux and macOS:

$ pip3 install apiflask

For Windows:

> pip install apiflask

Links

Example

from apiflask import APIFlask, Schema, input, output, abort
from apiflask.fields import Integer, String
from apiflask.validators import Length, OneOf

app = APIFlask(__name__)

pets = [
    {'id': 0, 'name': 'Kitty', 'category': 'cat'},
    {'id': 1, 'name': 'Coco', 'category': 'dog'}
]


class PetInSchema(Schema):
    name = String(required=True, validate=Length(0, 10))
    category = String(required=True, validate=OneOf(['dog', 'cat']))


class PetOutSchema(Schema):
    id = Integer()
    name = String()
    category = String()


@app.get('/')
def say_hello():
    # returning a dict equals to use jsonify()
    return {'message': 'Hello!'}


@app.get('/pets/
    
     '
    )
@output(PetOutSchema)
def get_pet(pet_id):
    if pet_id > len(pets) - 1:
        abort(404)
    # you can also return an ORM/ODM model class instance directly
    # APIFlask will serialize the object into JSON format
    return pets[pet_id]


@app.patch('/pets/
    
     '
    )
@input(PetInSchema(partial=True))
@output(PetOutSchema)
def update_pet(pet_id, data):
    # the validated and parsed input data will
    # be injected into the view function as a dict
    if pet_id > len(pets) - 1:
        abort(404)
    for attr, value in data.items():
        pets[pet_id][attr] = value
    return pets[pet_id]
You can also use class-based views with MethodView
') class Pet(MethodView): @output(PetOutSchema) def get(self, pet_id): """Get a pet""" if pet_id > len(pets) - 1: abort(404) return pets[pet_id] @input(PetInSchema(partial=True)) @output(PetOutSchema) def patch(self, pet_id, data): """Update a pet""" if pet_id > len(pets) - 1: abort(404) for attr, value in data.items(): pets[pet_id][attr] = value return pets[pet_id] ">
from apiflask import APIFlask, Schema, input, output, abort
from apiflask.fields import Integer, String
from apiflask.validators import Length, OneOf
from flask.views import MethodView

app = APIFlask(__name__)

pets = [
    {'id': 0, 'name': 'Kitty', 'category': 'cat'},
    {'id': 1, 'name': 'Coco', 'category': 'dog'}
]


class PetInSchema(Schema):
    name = String(required=True, validate=Length(0, 10))
    category = String(required=True, validate=OneOf(['dog', 'cat']))


class PetOutSchema(Schema):
    id = Integer()
    name = String()
    category = String()


# use the "route" decorator to decorate the view class
@app.route('/')
class Hello(MethodView):

    # use HTTP method name as class method name
    def get(self):
        return {'message': 'Hello!'}


@app.route('/pets/
      
       '
      )
class Pet(MethodView):

    @output(PetOutSchema)
    def get(self, pet_id):
        """Get a pet"""
        if pet_id > len(pets) - 1:
            abort(404)
        return pets[pet_id]

    @input(PetInSchema(partial=True))
    @output(PetOutSchema)
    def patch(self, pet_id, data):
        """Update a pet"""
        if pet_id > len(pets) - 1:
            abort(404)
        for attr, value in data.items():
            pets[pet_id][attr] = value
        return pets[pet_id]
Or use async def with Flask 2.0
$ pip install -U flask[async]
import asyncio

from apiflask import APIFlask

app = APIFlask(__name__)


@app.get('/')
async def say_hello():
    await asyncio.sleep(1)
    return {'message': 'Hello!'}

See Using async and await for the details of the async support in Flask 2.0.

Save this as app.py, then run it with :

$ flask run --reload

Now visit the interactive API documentation (Swagger UI) at http://localhost:5000/docs:

Or you can visit the alternative API documentation (Redoc) at http://localhost:5000/redoc:

The auto-generated OpenAPI spec file is available at http://localhost:5000/openapi.json. You can also get the spec with the flask spec command:

$ flask spec

For some complete examples, see /examples.

Relationship with Flask

APIFlask is a thin wrapper on top of Flask. You only need to remember four differences (see Migrating from Flask for more details):

  • When creating an application instance, use APIFlask instead of Flask.
  • When creating a blueprint instance, use APIBlueprint instead of Blueprint.
  • The abort() function from APIFlask (apiflask.abort) returns JSON error response.
  • The view class should be registered with the route decorator.

For a minimal Flask application:

from flask import Flask, request, escape

app = Flask(__name__)

@app.route('/')
def hello():
    name = request.args.get('name', 'Human')
    return f'Hello, {escape(name)}'

Now change to APIFlask:

from apiflask import APIFlask  # step one
from flask import request, escape

app = APIFlask(__name__)  # step two

@app.route('/')
def hello():
    name = request.args.get('name', 'Human')
    return f'Hello, {escape(name)}'

In a word, to make Web API development in Flask more easily, APIFlask provides APIFlask and APIBlueprint to extend Flask's Flask and Blueprint objects and it also ships with some helpful utilities. Other than that, you are actually using Flask.

Relationship with marshmallow

APIFlask accepts marshmallow schema as data schema, uses webargs to validate the request data against the schema, and uses apispec to generate the OpenAPI representation from the schema.

You can build marshmallow schemas just like before, but APIFlask also exposes some marshmallow APIs for convenience (it's optional, you can still import everything from marshamallow directly):

  • apiflask.Schema: The base marshmallow schema class.
  • apiflask.fields: The marshmallow fields, contain the fields from both marshmallow and Flask-Marshmallow. Beware that the aliases (Url, Str, Int, Bool, etc.) were removed (vote in marshmallow #1828 to remove these aliases from marshmallow).
  • apiflask.validators: The marshmallow validators (vote in marshmallow #1829 for better names for validate-related APIs in marshmallow).
from apiflask import Schema
from apiflask.fields import Integer, String
from apiflask.validators import Length, OneOf
from marshmallow import pre_load, post_dump, ValidationError
Issues
  • Version 0.5.0 plan

    Version 0.5.0 plan

    opened by greyli 5
  • Optimize the import format

    Optimize the import format

    Optimize the import format using Python's standard grouping mechanism (parentheses), refering to PEP 328.

    opened by yuxiaoy1 5
  • RFC: Import and rename decorators from Marshmallow

    RFC: Import and rename decorators from Marshmallow

    I have some doubt about these changes, so I keep it as a undocumentated features so far. Basically, I change the name of the following decorators from Marshamallow:

    • validates -> validate
    • validates_schema -> validate_schema
    • ~~pre_load -> before_load~~
    • ~~post_load -> after_load~~
    • ~~pre_dump -> before_dump~~
    • ~~post_dump -> after_dump~~

    Some ideas behind these changes:

    • validate and validate_schema are short and clear than validates and validates_schema. It also matches the validate keyword in field classes.
    • ~~The change from pre_ to before_ and from post_ to after_ was trying to follow the name convention in Flask (before_request, etc.).~~

    IMO, the new names are easier to understand and intuitive. However, this will definitely introduce "breaking" changes between APIFlask and Marshmallow. I can add a warning in the docs to inform users that they can continue to import everything from marshmallow, but notice the name changes if they want to import from APIFlask.

    Is it a good or bad idea? Feel free to leave any thoughts.

    request for comment 
    opened by greyli 5
  • BASE_RESPONSE_SCHEMA not use in APIBlueprint

    BASE_RESPONSE_SCHEMA not use in APIBlueprint

    the BASE_RESPONSE_SCHEMA not use in APIBlueprint

    class BaseResponseSchema(Schema):
        message = String()
        status_code = Integer()
        data = Field()  # the data key
    
    app.config['BASE_RESPONSE_SCHEMA'] = BaseResponseSchema
    app.config['BASE_RESPONSE_DATA_KEY '] = 'data'
    

    just return the data, like this

    {
        "data": {
            "category": "dog",
            "id": 3,
            "name": "admin13"
        }
    }
    
    

    I can’t determine whether it’s a bug or a problem with my settings

    need more info 
    opened by zhibeen 4
  • Is it possible to display a documentation for an APIBlueprint?

    Is it possible to display a documentation for an APIBlueprint?

    I'm currently using APIFlask to develop the 3rd version of flog web api and the API is in an APIBlueprint. And I open /api/v3/redoc in my browser but it returns a 404 response.

    What I have done:

    1. An APIBlueprint instance with the /api/v3 url prefix
    2. A schema

    What's expected: When I get to /api/v3/redoc, it should display my documentation for the web api.

    opened by z-t-y 3
  • Can't get static files work in version 0.6.1

    Can't get static files work in version 0.6.1

    Can't get static files work in version 0.6.1

    Example:

    from apiflask import APIFlask
    app = APIFlask(__name__)
    
    @app.route("/")
    def index():
        return ""
    
    h1 { font-size: 16px; }
    

    File Tree:

    /app-root
      app.py
      /static
        style.css
    

    And I GET /static/style.css in the browser, I expected to see:

    h1 { font-size: 16px; }
    

    But I got

    500 Internal Server Error
    

    What I have tried

    1. Change APIFlask to Flask, it works well.
    2. Change to any older version of APIFlask, it doesn't work.

    Environment:

    • Python version: 3.8.5
    • Flask version: 2.0.0
    • APIFlask version: 0.6.1
    opened by z-t-y 3
  • Delete py.types

    Delete py.types

    Delete py.types file.

    opened by 180909 3
  • Remove indentation spaces from docstrings as reflected in APIFairy

    Remove indentation spaces from docstrings as reflected in APIFairy

    Checklist:

    • [:heavy_check_mark:] Add tests that demonstrate the correct behavior of the change. Tests should fail without the change.
    • [:heavy_check_mark:] Add or update relevant docs, in the docs folder and in code docstring.
    • [:heavy_multiplication_x:] Add an entry in CHANGES.md summarizing the change and linking to the issue and your username.
    • [:heavy_multiplication_x:] Add *Version changed* or *Version added* note in any relevant docs and docstring.
    • [:heavy_check_mark:] Run pytest and tox, no tests failed.
    opened by henshalb 2
  • Support using async views for Flask 2.0

    Support using async views for Flask 2.0

    A fix for Flask 2.0's async support.

    @app.get('/')
    async def say_hello():
        await asyncio.sleep(1)
        return {'message': 'Hello!'}
    
    
    @app.get('/pets/<int:pet_id>')
    @output(PetOutSchema)
    async def get_pet(pet_id):
        if pet_id > len(pets) - 1:
            abort(404)
        return pets[pet_id]
    

    Checklist:

    • [x] Add tests that demonstrate the correct behavior of the change. Tests should fail without the change.
    • [ ] Add or update relevant docs, in the docs folder and in code docstring.
    • [x] Add an entry in CHANGES.md summarizing the change and linking to the issue and your username.
    • [x] Add *Version Changed* or *Version Added* note in any relevant docs and docstring.
    • [x] Run pytest and tox, no tests failed.
    opened by greyli 2
  • Add custom error classes support for HTTPError

    Add custom error classes support for HTTPError

    Add custom error classes support for HTTPError, the status_code now is a keyword argument, defaults to 500.

    • fixes #172

    Checklist:

    • [x] Add tests that demonstrate the correct behavior of the change. Tests should fail without the change.
    • [ ] Add or update relevant docs, in the docs folder and in code docstring.
    • [x] Add an entry in CHANGES.md summarizing the change and linking to the issue and your username.
    • [x] Add *Version changed* or *Version added* note in any relevant docs and docstring.
    • [x] Run pytest and tox, no tests failed.
    opened by greyli 0
  • Consider moving APIFlask back to an extension

    Consider moving APIFlask back to an extension

    See this discussion where Grey says:

    Glad to see this finally merged! After I proposed this idea and was declined in the first pallets meeting, I started to make the REST API extension I'm developing to become a framework so that I can inherit the Flask class and add these route shortcuts, now I may consider making it back to an extension...

    Motivation

    So that we can healthily mix different extensions and not make APIFlask our main point of entry.

    improvement 
    opened by Abdur-rahmaanJ 1
  • Add auto-headers support for HTTPError

    Add auto-headers support for HTTPError

    Find a way to reuse the get_headers() methods from Werkzeug exceptions for HTTPError.

    related to #173

    improvement 
    opened by greyli 0
  • Improve the error handling docs

    Improve the error handling docs

    • Add a custom error class section.
    • Merge redundant contents about error response body fields.
    • Add a validation error section.
    • Clarify the differences between HTTPError and HTTPException, apiflask.abort and flask.abort.
    • Add a section about tips for different app error handling situations.

    Also, add an example for the error handling feature.

    improvement docs 
    opened by greyli 0
  • Support to add custom error classes based on `HTTPError`

    Support to add custom error classes based on `HTTPError`

    Refactor the HTTPError class to support adding custom error classes, for example:

    from apiflask import HTTPError
    
    class NotAuthor(HTTPError):
        status_code = 400
        message = 'Only the author can perform this action!'
        extra_data = {
            'error_code': 1234,
            'docs': 'http://example.com'
        }
    

    Raise the error in the view:

    @app.get('/')
    def hello():
        if not author:
            raise NotAuthor
        return 'Hello!'
    
    improvement 
    opened by greyli 0
  • Apply custom error processor for generic HTTP errors even `json_errors` is `False`

    Apply custom error processor for generic HTTP errors even `json_errors` is `False`

    Currently, if the json_errors is False when creating the app instance, the error processor registered with app.error_processor will not be applied on generic HTTP errors. I think it's better to change this behavior to match the behavior of auth.error_processor and keep it explicit.

    request for comment improvement on hold 
    opened by greyli 0
  • VersionConflict: (apispec 4.2.0 (c:\python\python38-64\lib\site-packages), Requirement.parse('apispec[yaml]<4,>=3.3'))

    VersionConflict: (apispec 4.2.0 (c:\python\python38-64\lib\site-packages), Requirement.parse('apispec[yaml]<4,>=3.3'))

    C:\Users\chao\Documents\PROJECTS\python>flask run --reload Traceback (most recent call last): File "c:\python\python38-64\lib\runpy.py", line 194, in _run_module_as_main return run_code(code, main_globals, None, File "c:\python\python38-64\lib\runpy.py", line 87, in run_code exec(code, run_globals) File "C:\Python\Python38-64\Scripts\flask.exe_main.py", line 7, in File "c:\python\python38-64\lib\site-packages\flask\cli.py", line 990, in main cli.main(args=sys.argv[1:]) File "c:\python\python38-64\lib\site-packages\flask\cli.py", line 596, in main return super().main(*args, **kwargs) File "c:\python\python38-64\lib\site-packages\click\core.py", line 782, in main rv = self.invoke(ctx) File "c:\python\python38-64\lib\site-packages\click\core.py", line 1254, in invoke cmd_name, cmd, args = self.resolve_command(ctx, args) File "c:\python\python38-64\lib\site-packages\click\core.py", line 1297, in resolve_command cmd = self.get_command(ctx, cmd_name) File "c:\python\python38-64\lib\site-packages\flask\cli.py", line 539, in get_command self.load_plugin_commands() File "c:\python\python38-64\lib\site-packages\flask\cli.py", line 535, in load_plugin_commands self.add_command(ep.load(), ep.name) File "c:\python\python38-64\lib\site-packages\pkg_resources_init.py", line 2460, in load self.require(*args, **kwargs) File "c:\python\python38-64\lib\site-packages\pkg_resources_init.py", line 2483, in require items = working_set.resolve(reqs, env, installer, extras=self.extras) File "c:\python\python38-64\lib\site-packages\pkg_resources_init.py", line 790, in resolve raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.VersionConflict: (apispec 4.2.0 (c:\python\python38-64\lib\site-packages), Requirement.parse('apispec[yaml]<4,>=3.3'))

    能提供一下requeirments.txt吗,我在3.8上测试不过,包冲突,重新安装apispec,你的程序报得大于4.2.0

    improvement need more info 
    opened by m986883511 1
  • Add support for Pydantic

    Add support for Pydantic

    Can you join the support of pydantic, so that users can choose more than one, so that people who like different styles can choose freely according to their hobbies, thank you

    feature 
    opened by limmyforget 1
  • Support file uploading for OAS

    Support file uploading for OAS

    Basic ideas:

    • Add File and Files fields.
    • Register some custom field converters.
    • Update the spec based on the field type.

    References:

    • https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#considerations-for-file-uploads
    • https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#special-considerations-for-multipart-content
    feature 
    opened by greyli 0
  • Parameter example support

    Parameter example support

    Support to set a custom example for request parameters.

    @input(PetQuerySchema, location='query', example=..., examples=[...])
    
    feature 
    opened by greyli 0
Releases(0.10.1)
  • 0.10.1(Nov 26, 2021)

  • 0.10.0(Sep 19, 2021)

    Features:

    • Add parameter extra_data to abort and HTTPError, it accepts a dict that will be added to the error response (#125).
    from apiflask import abort
    
    @app.get('/')
    def missing():
        abort(404, message='nothing', extra_data={'code': '123', 'status': 'not_found'})
    
    • Support passing operation_id in the doc decorator (docs).
    @app.get('/')
    @doc(operation_id='myCustomHello')
    def hello():
        pass
    
    • Support setting response links via @output(links=...) (docs).
    pet_links = {
        'getAddressByUserId': {
            'operationId': 'getUserAddress',
            'parameters': {
                'userId': '$request.path.id'
            }
        }
    }
    
    @app.post('/pets')
    @output(PetOutSchem, links=pet_links)
    def new_pet(data):
        pass
    
    • Support using add_url_rule method on view classes.

    Undocumented breaking changes:

    • Only expose marshmallow fields, validators, and Schema in APIFlask.
    • Remove the status_code field from the default error response (#124).
    Source code(tar.gz)
    Source code(zip)
  • 0.9.0(Aug 10, 2021)

    Breaking change:

    • Custom error processor now should accept an HTTPError object instead of individual error information:
    @app.error_processor
    def my_error_processor(error):
        return {
            'status_code': error.status_code,
            'message': error.message,
            'errors': error.detail
        }, error.status_code, error.headers
    
    

    Features:

    • Support base response schema customization (docs). See a full example at here.
    • Support setting custom schema name resolver via the APIFlask.schema_name_resolver attribute (docs).
    • Support to config Redoc via the configuration variable REDOC_CONFIG:
    app.config['REDOC_CONFIG'] = {'disableSearch': True, 'hideLoading': True}
    

    There are also some improvements on error handling, see the full changelog for more details: https://apiflask.com/changelog/#version-090

    Source code(tar.gz)
    Source code(zip)
  • 0.8.0(Jul 7, 2021)

    This is the first stable version. From this version, all breaking changes will start with a deprecated warning.

    Some major changes in this version:

    • Automatically add a 404 response in OpenAPI spec for routes contains URL variables:
    @app.get('/pets/<id>')
    def get_pet(id):
        pass
    

    So user don't need to set a 404 response manually:

    @app.get('/pets/<id>')
    @doc(responses=[404])
    def get_pet(id):
        pass
    
    • The app.spec property now will always return the latest spec instead of the cached one (docs):
    >>> from apiflask import APIFlask
    >>> app = APIFlask(__name__)
    >>> app.spec
    {'info': {'title': 'APIFlask', 'version': '0.1.0'}, 'tags': [], 'paths': OrderedDict(), 'openapi': '3.0.3'}
    >>> @app.get('/')
    ... def hello():
    ...     return {'message': 'Hello'}
    ...
    >>> app.spec
    {'info': {'title': 'APIFlask', 'version': '0.1.0'}, 'tags': [], 'paths': OrderedDict([('/', {'get': {'parameters': [], 'responses': OrderedDict([('200', {'content': {'application/json': {'schema': {}}}, 'description': 'Successful response'})]), 'summary': 'Hello'}})]), 'openapi': '3.0.3'}
    >>>
    
    • Add configration variable INFO (and app.info attribute), it can be used to set the following info fields: description, termsOfService, contact, license (docs):
    app.info = {
        'description': '...',
        'termsOfService': 'http://example.com',
        'contact': {
            'name': 'API Support',
            'url': 'http://www.example.com/support',
            'email': '[email protected]'
        },
        'license': {
            'name': 'Apache 2.0',
            'url': 'http://www.apache.org/licenses/LICENSE-2.0.html'
        }
    }
    
    
    • Rename the following configuration variables:
      • AUTO_PATH_SUMMARY -> AUTO_OPERATION_SUMMARY
      • AUTO_PATH_DESCRIPTION -> AUTO_OPERATION_DESCRIPTION

    See details in the changelog: https://github.com/greyli/apiflask/blob/main/CHANGES.md#version-080

    Source code(tar.gz)
    Source code(zip)
  • 0.7.0(Jun 24, 2021)

    Some major changes in this version:

    • Add a flask spec command to output the OpenAPI spec to stdout or a file (docs).
    • Support keeping the local spec in sync automatically (docs).
    • Re-add the SPEC_FORMAT config. Remove the auto-detection of the format from APIFlask(spec_path=...) (docs).
    • Fix auto-tag support for nesting blueprint.
    • Add a new docs chapter for OpenAPI generating: https://apiflask.com/openapi/

    See more in the changelog: https://github.com/greyli/apiflask/blob/main/CHANGES.md#version-070

    Source code(tar.gz)
    Source code(zip)
  • 0.6.3(May 17, 2021)

  • 0.6.2(May 16, 2021)

  • 0.6.1(May 15, 2021)

    A bugfix release for Flask 2.0:

    • Fix various type annotation issues.
    • Fix async support.

    See the changelog for the details:

    https://github.com/greyli/apiflask/blob/master/CHANGES.md#version-061

    Source code(tar.gz)
    Source code(zip)
  • 0.6.0(May 11, 2021)

  • 0.5.2(Apr 29, 2021)

    A bugfix release.

    • Allow returning a Response object in a view function decorated with output decorator. In this case, APIFlask will do nothing but return it directly.
    • Skip Flask's Blueprint objects when generating the OpenAPI spec
    Source code(tar.gz)
    Source code(zip)
  • 0.5.1(Apr 28, 2021)

    A bugfix release.

    • Add a temp fix for https://github.com/pallets/flask/issues/3981.
    • Change the default endpoint of the view class to the original class name.
    Source code(tar.gz)
    Source code(zip)
  • 0.5.0(Apr 27, 2021)

    The core feature added in this version is class-based views support. Check out the example application or documentation for more details.

    This version also introduces some breaking changes:

    • Remove the configuration variable DOCS_HIDE_BLUEPRINTS, add APIBlueprint.enable_openapi as a replacement.
    • Remove the support to generate info.description and tag description from the module docstring, and also remove the AUTO_DESCRIPTION config.
    • No longer support mix the use of flask.Bluerpint and apiflask.APIBluerpint.

    See the changelog for more details.

    0.5.0 Changelog: https://github.com/greyli/apiflask/blob/master/CHANGES.md#version-050

    Source code(tar.gz)
    Source code(zip)
  • 0.4.0(Apr 20, 2021)

    This version introduces some breaking changes:

    • Rename abort_json() to abort().
    • Some undocumented configuration variables were deleted.

    There are also some bug fixes and new features. Check out the changelog for the details.

    0.4.0 Changelog: https://github.com/greyli/apiflask/blob/master/CHANGES.md#version-040

    Source code(tar.gz)
    Source code(zip)
  • 0.3.0(Mar 31, 2021)

    This is the first public version.

    This version has some API change, public API changes including:

    • Rename function api_abort() to abort_json().
    • Change decorator attribute @doc(tags) to @doc(tag).

    Besides, this version has basic type annotations for the package, the tests will be updated in the next version.

    Check out the changelog for the details.

    0.3.0 Changelog: https://github.com/greyli/apiflask/blob/master/CHANGES.md#version-030

    Source code(tar.gz)
    Source code(zip)
  • 0.2.0(Mar 27, 2021)

    From version 0.2.0, this project became a framework instead of a Flask extension. It provided two classes to replace the one in Flask:

    • flask.Flask -> apiflask.APIFlask
    • flask.Blueprint -> apiflask.APIBlueprint

    This version also added some more useful features, a bunch of configuration variables, and changed almost all the APIs. Check out the changelog for the details.

    Changelog: https://github.com/greyli/apiflask/blob/master/CHANGES.md#version-020

    Source code(tar.gz)
    Source code(zip)
  • 0.1.0(Jan 27, 2021)

    Based on APIFairy 0.6.3dev, version 0.1.0 added some useful features, check out the changelog for the details.

    • Changelog: https://github.com/greyli/apiflask/blob/master/CHANGES.md#version-010
    Source code(tar.gz)
    Source code(zip)
Owner
Grey Li
Web developer, member of @pallets, creator of @helloflask.
Grey Li
Flask-Potion is a RESTful API framework for Flask and SQLAlchemy, Peewee or MongoEngine

Flask-Potion Description Flask-Potion is a powerful Flask extension for building RESTful JSON APIs. Potion features include validation, model resource

DTU Biosustain 482 Nov 23, 2021
Flask-Potion is a RESTful API framework for Flask and SQLAlchemy, Peewee or MongoEngine

Flask-Potion Description Flask-Potion is a powerful Flask extension for building RESTful JSON APIs. Potion features include validation, model resource

DTU Biosustain 484 Feb 3, 2021
Pyrin is an application framework built on top of Flask micro-framework to make life easier for developers who want to develop an enterprise application using Flask

Pyrin A rich, fast, performant and easy to use application framework to build apps using Flask on top of it. Pyrin is an application framework built o

Mohamad Nobakht 7 Nov 15, 2021
A public API written in Python using the Flask web framework to determine the direction of a road sign using AI

python-public-API This repository is a public API for solving the problem of the final of the AIIJC competition. The task is to create an AI for the c

Lev 1 Nov 8, 2021
Sierra is a lightweight Python framework for building and integrating web applications

A lightweight Python framework for building and Integrating Web Applications. Sierra is a Python3 library for building and integrating web applications with HTML and CSS using simple enough syntax. You can develop your web applications with Python, taking advantage of its functionalities and integrating them to the fullest.

null 76 Nov 17, 2021
Endpoints is a lightweight REST api framework written in python and used in multiple production systems that handle millions of requests daily.

Endpoints Quickest API builder in the West! Endpoints is a lightweight REST api framework written in python and used in multiple production systems th

Jay Marcyes 31 Oct 23, 2021
Lemon is an async and lightweight API framework for python

Lemon is an async and lightweight API framework for python . Inspired by Koa and Sanic .

Joway 27 Oct 18, 2021
Asita is a web application framework for python based on express-js framework.

Asita is a web application framework for python. It is designed to be easy to use and be more easy for javascript users to use python frameworks because it is based on express-js framework.

Mattéo 4 Nov 16, 2021
web.py is a web framework for python that is as simple as it is powerful.

web.py is a web framework for Python that is as simple as it is powerful. Visit http://webpy.org/ for more information. The latest stable release 0.62

null 5.6k Nov 24, 2021
Fully featured framework for fast, easy and documented API development with Flask

Flask RestPlus IMPORTANT NOTICE: This project has been forked to Flask-RESTX and will be maintained by by the python-restx organization. Flask-RESTPlu

Axel H. 2.6k Nov 22, 2021
Fully featured framework for fast, easy and documented API development with Flask

Flask RestPlus IMPORTANT NOTICE: This project has been forked to Flask-RESTX and will be maintained by by the python-restx organization. Flask-RESTPlu

Axel H. 2.5k Feb 17, 2021
Free and open source full-stack enterprise framework for agile development of secure database-driven web-based applications, written and programmable in Python.

Readme web2py is a free open source full-stack framework for rapid development of fast, scalable, secure and portable database-driven web-based applic

null 2k Nov 22, 2021
PipeLayer is a lightweight Python pipeline framework

PipeLayer is a lightweight Python pipeline framework. Define a series of steps, and chain them together to create modular applications

greaterthan 60 Sep 3, 2021
Pretty tornado wrapper for making lightweight REST API services

CleanAPI Pretty tornado wrapper for making lightweight REST API services Installation: pip install cleanapi Example: Project folders structure: . ├──

Vladimir Kirievskiy 20 Nov 8, 2021
FPS, fast pluggable server, is a framework designed to compose and run a web-server based on plugins.

FPS, fast pluggable server, is a framework designed to compose and run a web-server based on plugins. It is based on top of fastAPI, uvicorn, typer, and pluggy.

Adrien Delsalle 1 Nov 16, 2021
cirrina is an opinionated asynchronous web framework based on aiohttp

cirrina cirrina is an opinionated asynchronous web framework based on aiohttp. Features: HTTP Server Websocket Server JSON RPC Server Shared sessions

André Roth 33 Nov 24, 2021
Web framework based on type hint。

Hint API 中文 | English 基于 Type hint 的 Web 框架 hintapi 文档 hintapi 实现了 WSGI 接口,并使用 Radix Tree 进行路由查找。是最快的 Python web 框架之一。一切特性都服务于快速开发高性能的 Web 服务。 大量正确的类型

Aber 15 Nov 14, 2021
Daniel Vaz Gaspar 3.6k Nov 23, 2021
Swagger/OpenAPI First framework for Python on top of Flask with automatic endpoint validation & OAuth2 support

Connexion Connexion is a framework that automagically handles HTTP requests based on OpenAPI Specification (formerly known as Swagger Spec) of your AP

Zalando SE 3.9k Dec 1, 2021