Skip to main content

A small but useful package to load, validate and use typed data structures, including configuration files.

Project description

Latest Version License Python Versions CI Coverage

datastruct

A small but useful package to load, validate and use typed data structures, including configuration files.

You get:

  • An easy way to define a typed hierarchical data structure.

  • Hassle free definition nested structures.

  • Loading from a variety of formats (json, yaml and everything supported by Serialize),

  • Error checking including: missing values, unexpected value, wrong type, wrong value.

  • Easy to integrate in another app error reporting.

Installation

pip install datastruct

Usage

When an invalid value is found, an exception will be raised.

If you want to accumulate all errors for inspection:

You can then use the DataStruct object in your code:

See AUTHORS for a list of the maintainers.

To review an ordered list of notable changes for each version of a project, see CHANGES

Supported by

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