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.3.tar.gz
(10.2 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.3.tar.gz.
File metadata
- Download URL: djanticapi-0.0.3.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.24.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
450b5ec2004439994d2ccd2edea43a70df3989e2b3ada474ffd064ce58e6e0ac
|
|
| MD5 |
4f6dda38bef836ba534c70c9333d7d39
|
|
| BLAKE2b-256 |
9db4f9a2144534747dec70a3469b17d136ac7339b8c742bd76dff1c8232f0c2d
|
File details
Details for the file djanticapi-0.0.3-py3-none-any.whl.
File metadata
- Download URL: djanticapi-0.0.3-py3-none-any.whl
- Upload date:
- Size: 14.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.24.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec1060a1b490adba96360c4c4f819a71da9fce185b53e4608b68f0a72434f95a
|
|
| MD5 |
b3d743d3bc685b247d837495b389aa34
|
|
| BLAKE2b-256 |
e55c7837b92d5d750c906ac71636fe9c887454fdb33899fccc25d0ea6a0daef1
|