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
- Host: GitHub
- URL: https://github.com/lewoudar/flask_schema
- Owner: lewoudar
- Created: 2024-01-21T13:26:29.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-21T17:17:04.000Z (over 2 years ago)
- Last Synced: 2024-01-29T00:18:02.179Z (over 2 years ago)
- Topics: api-rest, flask, pydantic, validation
- Language: Python
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```