Metadata-Version: 2.1
Name: pydantic-webargs
Version: 1.0.0
Summary: Pydatic webargs
Home-page: https://ahmednafies.github.io/pydantic_webargs/
Author: Ahmed Nafies
Author-email: ahmed.nafies@gmail.com
License: MIT
Project-URL: Documentation, https://ahmednafies.github.io/pydantic_webargs/
Project-URL: Source, https://github.com/ahmednafies/pydantic_webargs
Description: # Pyndatic Webargs
        [![CircleCI](https://circleci.com/gh/ahmednafies/pydantic-webargs.svg?style=shield)](https://circleci.com/gh/ahmednafies/pydantic-webargs) [![codecov](https://codecov.io/gh/ahmednafies/pydantic-webargs/branch/master/graph/badge.svg)](https://codecov.io/gh/ahmednafies/pydantic-webargs) ![GitHub Pipenv locked Python version](https://img.shields.io/github/pipenv/locked/python-version/ahmednafies/pydantic-webargs) [![Downloads](https://pepy.tech/badge/pydantic-webargs)](https://pepy.tech/project/pydantic-webargs) ![license](https://img.shields.io/badge/license-MIT-green)
        
        A library for parsing and validating http requests for flask web-framework using pydantic library 
        
        Full documentation [here](https://ahmednafies.github.io/pydantic_webargs/)
        
        ## Requirements
        
        	python >= 3.7
        
        ## How to install
        
        ```bash
        pip install pydantic-webargs
        ```
        
        ## Dependencies
        
        	flask
        	pydantic
        
        ## Example
        
        
        ```python
        from flask import Flask
        from pydantic import BaseModel
        from pydantic_webargs import webargs
        
        app = Flask(__name__)
        
        
        class QueryModel(BaseModel):
            name: str
        
        
        class BodyModel(BaseModel):
            age: int
        
        
        @app.route("/get-request", methods=["GET"])
        @webargs(query=QueryModel)
        def example_get_endpoint(**kwargs):
            response = kwargs
            return response
        
        
        @app.route("/post-request", methods=["POST"])
        @webargs(query=QueryModel, body=BodyModel)
        def example_post_endpoint(**kwargs):
            print(kwargs)
            response = kwargs
            return response
        
        
        if __name__ == "__main__":
            app.run(host="0.0.0.0", port=8000)
        ```
        
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: Topic :: Utilities
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Provides-Extra: dev
Provides-Extra: docs
