Skip to main content

MHHS validator

Project description

mhhs-validate

Validate data against the MHHS specifications.

Installation

pip install mhhs-validate

Usage

MHHS_VALIDATE_VERSION=1.7.3 mhhs-validate example.json

Other environment variables and their defaults:

# The schemas get cached locally
MHHS_VALIDATE_CACHE_DIR=~/.mhhs-validate
# Names of the domains to fetch
MHHS_VALIDATE_DOMAINS=DataCatalogue,DataTypes,RealCommonBlocks,Interfaces-EventCodes,ECS-Reports,ECS-CommonBlocks

Example output

Failed validating 'enum' in

    schema['properties']['CommonBlock']['properties']['M0']['properties']['GSPGroupID']:

    {'$anchor': 'DI-037-GSP-Group-ID',
     'description': 'Identifies the distinct grid supply point group '
                    '(physical region of the country) where the metering '
                    'point is located.',
     'enum': ['_A',
              '_B',
              '_C',
              '_D',
              '_E',
              '_F',
              '_G',
              '_H',
              '_J',
              '_K',
              '_L',
              '_M',
              '_N',
              '_P'],
     'example': '_K',
     'maxLength': 2,
     'minLength': 2,
     'type': 'string'}

On instance['CommonBlock']['M0']['GSPGroupID']:
    '_X'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mhhs_validate-0.0.2.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

mhhs_validate-0.0.2-py3-none-any.whl (5.1 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