report voluptuous errors
Project description
- Version:
- 0.0.0
- Released:
2024-02-25
A convenience function used for reporting voluptuous errors from nestedtext with inform. Here is a typical use of this function:
>>> from voluptuous import Schema, Invalid, MultipleInvalid, Required
>>> from voluptuous_errors import report_voluptuous_errors
>>> from inform import error, os_error, terminate
>>> import nestedtext as nt
>>> try:
... settings_path = Path('settings.nt')
... settings = nt.load(
... settings_path,
... keymap = (keymap:={}),
... )
... settings = schema(settings)
>>> except nt.NestedTextError as e:
... e.report()
>>> except MultipleInvalid as e:
... report_voluptuous_errors(e, keymap, settings_path)
>>> except OSError as e:
... error(os_error(e))
>>> terminate()
This code will report all errors found by Voluptuous when reading the settings file.
Releases
- Latest development release:
- Version: 0.5.0Released: 2022-09-02
- 0.0 (2024-02-25):
Initial version.
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
voluptuous_errors-0.0.tar.gz
(2.1 kB
view details)
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 voluptuous_errors-0.0.tar.gz.
File metadata
- Download URL: voluptuous_errors-0.0.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3bfd4046e605647ba039b6caaecd791780f8f61a64a8ee5ede799fcb08c11bbe
|
|
| MD5 |
f705687025fc7be518ef2d89675febe8
|
|
| BLAKE2b-256 |
42eb014ccdccb1d414456c3dfd378370cb1174f1467159c61f8003ccf5c13010
|
File details
Details for the file voluptuous_errors-0.0-py3-none-any.whl.
File metadata
- Download URL: voluptuous_errors-0.0-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b1db3607411709d9c5c94e7df5c31f974c113367ec67e51d352e05cda6d5074
|
|
| MD5 |
1a4cbc84ee85cd456d9b1cafc31dd3b1
|
|
| BLAKE2b-256 |
7bb2f4934cd8759279044f1f04e39958db920e49ea6cf8e68afa552b1cc4d763
|