Skip to main content

report voluptuous errors

Project description

Author:

Ken Kundert

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.0
Released: 2022-09-02
0.0 (2024-02-25):

Initial version.

Project details


Release history Release notifications | RSS feed

This version

0.0

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)

Uploaded Source

Built Distribution

voluptuous_errors-0.0-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

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

Hashes for voluptuous_errors-0.0.tar.gz
Algorithm Hash digest
SHA256 3bfd4046e605647ba039b6caaecd791780f8f61a64a8ee5ede799fcb08c11bbe
MD5 f705687025fc7be518ef2d89675febe8
BLAKE2b-256 42eb014ccdccb1d414456c3dfd378370cb1174f1467159c61f8003ccf5c13010

See more details on using hashes here.

File details

Details for the file voluptuous_errors-0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for voluptuous_errors-0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5b1db3607411709d9c5c94e7df5c31f974c113367ec67e51d352e05cda6d5074
MD5 1a4cbc84ee85cd456d9b1cafc31dd3b1
BLAKE2b-256 7bb2f4934cd8759279044f1f04e39958db920e49ea6cf8e68afa552b1cc4d763

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page