Declare and validate HTTP query and path parameters in aiohttp
Project description
aiohttp-parameter-parser
Declare and validate HTTP query and path parameters in aiohttp views.
Currently only path and URL query parameter location are supported.
Example usage:
from aiohttp import web
from aiohttp_parameter_parser import ParameterView
class ExampleHandler(ParameterView):
async def get(self) -> web.Response:
my_array_of_ints: int = self.query_parameter(
"parameter_name_in_request",
required=True,
is_array=True,
is_int=True,
)
# If provided parameter is of wrong type or missing,
# a default HTTP 400 response is returned to client.
return web.json_response({"received_param": my_array_of_ints})
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aiohttp-parameter-parser-0.1.1.tar.gz.
File metadata
- Download URL: aiohttp-parameter-parser-0.1.1.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1eb14013c07ba21a216e40eb043a16519ca38e3d65b582e8c36054eb72662b10
|
|
| MD5 |
421c41701782f96a6797cd6e73a7d5f5
|
|
| BLAKE2b-256 |
680e43fb76458a72bfab7eabf749038670cafd4cdf2100bae882271b8c71c29f
|
File details
Details for the file aiohttp_parameter_parser-0.1.1-py3-none-any.whl.
File metadata
- Download URL: aiohttp_parameter_parser-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ca3be6c9a2fa68d4c3ea2955d7c7e70bdfa82a820cb607687d1c2fbfde5f149
|
|
| MD5 |
b102ccb6506f20522a7f76d60291d88a
|
|
| BLAKE2b-256 |
7cfcbfb5b139ddd30a0591da8040713880db8c9143ce7029cd9f620accab3f9f
|