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
Release history Release notifications | RSS feed
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)
Built Distribution
speccify-0.2.0-py3-none-any.whl
(10.0 kB
view details)
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b3095e461a0e1eafb6dc5b48991edea3d0c5b9bcd79473f5c929c954b51a564 |
|
MD5 | b204dd1b3e961764705478a9be7dc7bd |
|
BLAKE2b-256 | 51256af2f977622506eadbc386f9b4dbb5f9d304453b2c1572baa7953254b1e1 |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9eb0b97ac2e2041eeed06307d25cfd9c9f888d8fafe25e10d15df3524dc56f6 |
|
MD5 | 99068716c991dafdee7912b2f351cf71 |
|
BLAKE2b-256 | affb8ab7ea0a368f977f9aa9214ee0a27ee9ac84b5985f0d84dd44667bbee41d |