Skip to main content

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.py with:
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.1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

djanticapi-0.0.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file djanticapi-0.0.1.tar.gz.

File metadata

  • Download URL: djanticapi-0.0.1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.24.0

File hashes

Hashes for djanticapi-0.0.1.tar.gz
Algorithm Hash digest
SHA256 3e27a59bb36069ce1057aa6848ef4362e09b6360f356e978c5fca40e87bad9a0
MD5 7b52c7eb25711ac86f88b9213ca29ed1
BLAKE2b-256 7781eb5ba40aa81bd52b6ec451c9a21cec7e49bffa2531dea7f6a71bc65e6403

See more details on using hashes here.

File details

Details for the file djanticapi-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: djanticapi-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.24.0

File hashes

Hashes for djanticapi-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2cae09200de0b910d2fa753cf0ad9af05b251cad0f95a63e8265d808155a4c2a
MD5 542b958c437e2b8e5b42bad90b75a83b
BLAKE2b-256 ad0629885c1ea36d920ee6023f4531f34f24c5ecbb2d17d3b126661ac2acde43

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page