{"repo":"pallets-eco/flask-pydantic","free":true,"listed":false,"github":"https://github.com/pallets-eco/flask-pydantic","clone":"git clone https://github.com/pallets-eco/flask-pydantic.git","description":"flask extension for integration with the awesome pydantic package","language":"Python","stars":434,"topics":["flask","pydantic","validation"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Flask-Pydantic Flask extension for integration of the awesome pydantic package with Flask. Pallets Community Ecosystem [!IMPORTANT]\\ This project is part of the Pallets Community Ecosystem. Pallets is the open source organization that maintains Flask; Pallets-Eco enables community maintenance of Flask extensions. If you are interested in helping maintain this project, please reach out on [the Pallets Discord server][discord]. [discord]: https://discord.gg/pallets Installation python3 -m pip install Flask-Pydantic Basics URL query and body parameters validate decorator validates query, body and form-data request parameters and makes them accessible two ways: 1. Using validate arguments, via flask's request variable parameter type request attribute name :------------------: :----------------------------: query query params body body params form form params 2. Using the decorated function argument parameters type hints URL path parameter If you use annotated path URL path parameters as follows flask pydantic will parse and validate user id variable in the same manner as for body and query parameters. --- Additional validate arguments - Success response status code can be modified via on success status parameter of validate decorator. - response many parameter set to True enables serialization of multiple models (route function should therefore return iterable of models). - request body many parameter set to False analogically enables serialization of multiple models inside of th","default_branch":null,"files":null,"tree":[],"storefront":"/r/pallets-eco","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/pallets-eco/flask-pydantic/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}