Skip to main content

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

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.2.0.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: speccify-0.2.0.tar.gz
  • Upload date:
  • Size: 9.2 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.2.0.tar.gz
Algorithm Hash digest
SHA256 3b3095e461a0e1eafb6dc5b48991edea3d0c5b9bcd79473f5c929c954b51a564
MD5 b204dd1b3e961764705478a9be7dc7bd
BLAKE2b-256 51256af2f977622506eadbc386f9b4dbb5f9d304453b2c1572baa7953254b1e1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: speccify-0.2.0-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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a9eb0b97ac2e2041eeed06307d25cfd9c9f888d8fafe25e10d15df3524dc56f6
MD5 99068716c991dafdee7912b2f351cf71
BLAKE2b-256 affb8ab7ea0a368f977f9aa9214ee0a27ee9ac84b5985f0d84dd44667bbee41d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

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