Voluptuous Errors — Voluptuous Error Reporting when using NestedText and Inform
- Author:
Ken Kundert
- Version:
0.2
- Released:
2026-06-28
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 reports all errors found by Voluptuous when reading the settings file. It employs the NestedText keymap facility to annotate the error messages with helpful context such as line numbers.
You can map Voluptuous error messages by importing and modifying voluptuous_error_msg_mappings. For example:
voluptuous_error_msg_mappings["expected a table name"] = ("unknown table.", "key")
The value consists of two values, the new message, and the location they message refers to. This second value may be either “key” or “value”.
Releases
Latest development release
0.2 (2026-06-28)
Return error count
0.1 (2026-06-10)
Improve error message (include value as codicil if appropriate).
0.0 (2024-02-25)
Initial version.
Metadata
Release files for voluptuous-errors 0.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 |
|---|---|---|---|---|
| voluptuous_errors-0.2.tar.gz | 3.8 kB | Without provenance | Details for voluptuous_errors-0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| voluptuous_errors-0.2-py3-none-any.whl | Python 3 | none | any | Details for voluptuous_errors-0.2-py3-none-any.whl |
Total release size: 8.0 kB
Release files / voluptuous_errors-0.2.tar.gz
| Download URL | voluptuous_errors-0.2.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7536ae63fdf0c9eebbf0a4a755f7307f3c85b5f0e53bcc234830b0f145b0907f
|
|
BLAKE2b-256 checksum How to use checksums |
fe9de36103a9fb56df1d5e82c2c95b8f41bf2e856ddc1a6fb36cee7fffe2500c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / voluptuous_errors-0.2-py3-none-any.whl
| Download URL | voluptuous_errors-0.2-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6acb36e536be8810d61c9fc2c6d4d489c3b0c7f329a6d5f466dae9ce3eb952f5
|
|
BLAKE2b-256 checksum How to use checksums |
188c507be2fcafdce319c7776d2f95ec8b0e1ba9292cbdfba6422c964c33e9d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Security for voluptuous-errors 0.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.