Pydantic data validation support for Django API View
Project description
Requirements
Python 3.6+
Djanticapi stands on the shoulders of giants:
Installation
$ pip install djanticapi
---> 100%
Example
Create it
- Create a file
api.pywith:
from django.http import HttpRequest
from djanticapi import BaseFormModel, BaseAPIView
class TestForm(BaseFormModel):
name: str
class TestView(BaseAPIView):
def post(self, request: HttpRequest):
form_data = TestForm.from_request(request=request)
return form_data
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
djanticapi-0.0.2.tar.gz
(5.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file djanticapi-0.0.2.tar.gz.
File metadata
- Download URL: djanticapi-0.0.2.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.24.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e68151290ff43bc01859f47cd5d50b8cffc0bbee645d322203189361ed837267
|
|
| MD5 |
f6e945a3a55b5a27c34c7f618298794d
|
|
| BLAKE2b-256 |
7e320c5230ab20cb9b13424b50e8c3c790d1e956d7c69c4573f1e826a7a45103
|
File details
Details for the file djanticapi-0.0.2-py3-none-any.whl.
File metadata
- Download URL: djanticapi-0.0.2-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.24.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
943ae12ed8439b9fafad340d60e5b4c29459e55789fbee32a9524ad10b0bdb03
|
|
| MD5 |
f2be47aa959f3868b864e705b8edac67
|
|
| BLAKE2b-256 |
0a00052a02cc147917a02db8a7f06c4817ccd5d522ac402b2243328808bfd910
|