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.3.tar.gz (10.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.3-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

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

Hashes for djanticapi-0.0.3.tar.gz
Algorithm Hash digest
SHA256 450b5ec2004439994d2ccd2edea43a70df3989e2b3ada474ffd064ce58e6e0ac
MD5 4f6dda38bef836ba534c70c9333d7d39
BLAKE2b-256 9db4f9a2144534747dec70a3469b17d136ac7339b8c742bd76dff1c8232f0c2d

See more details on using hashes here.

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

Hashes for djanticapi-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ec1060a1b490adba96360c4c4f819a71da9fce185b53e4608b68f0a72434f95a
MD5 b3d743d3bc685b247d837495b389aa34
BLAKE2b-256 e55c7837b92d5d750c906ac71636fe9c887454fdb33899fccc25d0ea6a0daef1

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