Vedro Valera Validator
⚠️ This package has been renamed to vedro-d42-validator. The vedro-valera-validator package on PyPI is no longer maintained. For updates and improvements, please use vedro-d42-validator going forward.
Installation
Quick
For a quick installation, you can use a plugin manager as follows:
$ vedro plugin install vedro-valera-validator
Manual
To install manually, follow these steps:
- Install the package using pip:
$ pip3 install vedro-valera-validator
- Next, activate the plugin in your
vedro.cfg.pyconfiguration file:
# ./vedro.cfg.py
import vedro
import vedro_valera_validator
class Config(vedro.Config):
class Plugins(vedro.Config.Plugins):
class ValeraValidator(vedro_valera_validator.ValeraValidator):
enabled = True
Usage
Here is an example scenario demonstrating how to decode a base64 encoded string:
# ./scenarios/decode_base64_encoded_string.py
import vedro
from base64 import b64decode
from d42 import schema
class Scenario(vedro.Scenario):
subject = "decode base64 encoded string"
def given(self):
self.encoded = "Y3VjdW1iZXI="
def when(self):
self.result = {
"result": b64decode(self.encoded)
}
def then(self):
assert self.result == schema.dict({
"result": schema.bytes(b"banana")
})
Run the test using the command:
$ vedro run
If the expected and actual results don't match, a ValidationException will be raised, as illustrated below:
ValidationException:
- Value <class 'bytes'> at _['result'] must be equal to b'banana', but b'cucumber' given
Metadata
Release files for vedro-valera-validator 1.2.1
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 |
|---|---|---|---|---|
| vedro_valera_validator-1.2.1.tar.gz | 8.1 kB | Without provenance | Details for vedro_valera_validator-1.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vedro_valera_validator-1.2.1-py3-none-any.whl | Python 3 | none | any | Details for vedro_valera_validator-1.2.1-py3-none-any.whl |
Total release size: 15.9 kB
Release files / vedro_valera_validator-1.2.1.tar.gz
| Download URL | vedro_valera_validator-1.2.1.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
541eaa21b59772812becec5ed2c50f3f335971813825831423c5510ee17ddf0b
|
|
BLAKE2b-256 checksum How to use checksums |
29f455bc6a98d95c715af81f2f81aca2ef56f00560f585bbf0881d8482a94de7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / vedro_valera_validator-1.2.1-py3-none-any.whl
| Download URL | vedro_valera_validator-1.2.1-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
622fe9a70d016ad818ee0c2bdae35f414e35f83568112d2fe0459edcd6f771dd
|
|
BLAKE2b-256 checksum How to use checksums |
67871638c8abeea38ec156eba6bce229db33900f51352c7c28e95bc2a85464a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for vedro-valera-validator 1.2.1
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.