covador
Validation library for processing http endpoint arguments.
from flask import Flask
from covador import split, opt
from covador.flask import query_string
app = Flask(__name__)
@app.route('/')
@query_string(foo=opt(split(int), []))
def csv_argument(foo):
return repr(foo)
# GET /?foo=1,2,3 -> [1, 2, 3]
if __name__ == '__main__':
app.run()
Support for flask(0.x, 1.0.x, 1.1.x), django(1.x, 2.x), aiohttp(2.x, 3.x), tornado(3.x, 4.x, 5.x, 6.x) and sanic(0.x, 18.x, 19.x).
Simple creating of custom query_string/form/params/json_body/args wrappers.
Multi dict support via item multi param.
Multi dict keys support via item src param.
Simple interface for custom validators/processors it’s just a callable.
Maps, typed Maps, Lists, Tuples, Enums.
Validation chains: opt(default=[]) | split(separator=' ') | List(int) | (lambda it: it[:10]) or more concise opt(split(int, separator=' '), []) | operator.itemgetter(slice(10)) — an optional argument of space separated integers and we need top 10 items from it and it is empty by default.
Literal schema: schema(foo=[{'boo': int}]), validates {'foo': [{'boo': 10}, {'boo': 20}]}.
Bytes/unicode aware.
Metadata
Release files for covador 0.10.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| covador-0.10.2.tar.gz | 14.3 kB | Without provenance | Details for covador-0.10.2.tar.gz |
Release files / covador-0.10.2.tar.gz
| Download URL | covador-0.10.2.tar.gz |
|---|---|
| Size | 14.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
31103723586e5e9edf171ae7b882567246efa66405a61f7b07bab571f7462458
|
|
BLAKE2b-256 checksum How to use checksums |
c942c25cfb7e2f053a97741f4bbc5c7d5503e97043fd36626f88e7817a14d471
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Security for covador 0.10.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.