Skip to main content

Flask-Lan is a modernized api suite with schema validator and auto docs

Project description


Flask-Lan is a modernized flask api builder with schema validator and openapi.


Currently, Flask-Lan is still under active development(before verion 1.0.0). Don't use it in production.

It's kind of like the famous library FastAPI, bringing part of brilliant features of FastAPI to your Flask application. For example, it uses Pydantic for Request/Response params validation and auto-generates openapi api docs.


  • Intuitive and easy to use.
  • Request/Response validation base on type hinting(by Pydantic).
  • Auto-generate openapi docs(both swagger and redoc).

Quick start

pip install Flask-Lan

A simple example:

from flask import Flask
from pydantic import BaseModel

from flask_lan import Lan, validator

app = Flask(__name__)

Lan(app, "Book API")

class BookSchema(BaseModel):
    title: str
    price: float

def example(id: int, hi: str, book: BookSchema):
    return book.dict()

if __name__ == "__main__":

Then open you will seen the api docs.


This project is licensed under the terms of the MIT license.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flask_lan-0.1.9.tar.gz (12.2 kB view hashes)

Uploaded Source

Built Distribution

flask_lan-0.1.9-py3-none-any.whl (10.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page