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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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