An open API service indexing awesome lists of open source software.

https://github.com/lewoudar/flask_schema

an experience to bring pydantic validation to a flask application
https://github.com/lewoudar/flask_schema

api-rest flask pydantic validation

Last synced: 5 months ago
JSON representation

an experience to bring pydantic validation to a flask application

Awesome Lists containing this project

README

          

# Flask Schema

This is an experiment to validate input and output data in a Flask application using [Pydantic](https://docs.pydantic.dev/latest/).
It's very much inspired by the [quart-schema](https://quart-schema.readthedocs.io/en/latest/tutorials/quickstart.html)
project.

It is not a **library**, just a pet project where I take ideas from quart-schemas to use them in a flask project.

## Installation

You will need **Python 3.11** or higher to run the project and [poetry](https://python-poetry.org/docs/) to install it.

```shell
$ poetry install
```

## Run the application

To run the development server:

```shell
$ flask --app flask_schema.main run --debug
```

To see the available routes:

```shell
$ flask --app flask_schema.main routes
```