Skip to main content

Tie together `drf-spectacular` and `djangorestframework-dataclasses` for easy-to-use apis and openapi schemas.

Project description

Speccify

Tie together drf-spectacular and djangorestframework-dataclasses for easy-to-use apis and openapi schemas.

Usage

    @dataclass
    class MyQueryData():
        name: str

    @dataclass
    class MyResponse:
        length: int

    @speccify.api_view(methods=["GET"], permissions=[])
    def my_view(request: Request, my_query: Query[MyQueryData]) -> MyResponse:
        name = my_query.name
        length = len(name)
        return MyResponse(length=length)

License

Apache2

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

speccify-0.1.1.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

speccify-0.1.1-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file speccify-0.1.1.tar.gz.

File metadata

  • Download URL: speccify-0.1.1.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for speccify-0.1.1.tar.gz
Algorithm Hash digest
SHA256 868b2cb5ae9ed9fe23242f6be28b162b7f8e196240cd6ecf302c741bc9012888
MD5 a9165790eb42aaab51745056889bc08e
BLAKE2b-256 2172c696ad0d3d580903b9c17601d5b4dad84d443ab5fa0c4f3af239c04930d3

See more details on using hashes here.

File details

Details for the file speccify-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: speccify-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for speccify-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f2d8f273113e515e08c9bf3246017ecc3ca0379129df1a76f74a27bb1aa0d865
MD5 7cae9742dafd8f2372267c15924d121e
BLAKE2b-256 bd02f2761ef19300146a533fbb47fbea773c44e091356cbdc449fac0a95f9b34

See more details on using hashes here.

Supported by

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