Skip to main content

This tool contains validation logic for the BO4E migration data model (ibims). It uses the pvframework.

Project description

Pedantic Validator Tool

Unittests status badge Coverage status badge Linting status badge Black status badge PyPI

This package contains the validation logic to validate the data of the BO4E migration model ibims. It uses the pedantic-validator-framework to create ValidationManagers for each data set in ibims. (Currently supported are only Customer, Network and Resource.)

This package is designed to be used together with bomf. Although, it only uses the MigrationConfig to use the migration_key_date which is necessary for some validations.

Usage

Install it from pypi:

pip install pvtool

To use the validation logic you just need to bind the preconfigured modules of this package to ValidationManager of your Injector. Alternatively, you could execute the provider-method of the module on your own by supplying a MigrationConfig instance.

from injector import Injector
from pvtool import ValidationManagerProviderCustomer
from pvframework import ValidationManager
from bomf.config import MigrationConfig
from datetime import datetime, UTC

customer_injector = Injector([
    ValidationManagerProviderCustomer,
    lambda binder: binder.bind(MigrationConfig, MigrationConfig(migration_key_date=datetime(2021, 1, 1, tzinfo=UTC))),
])

customer_validation_manager = customer_injector.get(ValidationManager)

How to use this Repository on Your Machine

Follow the instructions in our Python template repository.

Contribute

You are very welcome to contribute to this repository by opening a pull request against the main branch.

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

pvtool-0.3.2rc1.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

pvtool-0.3.2rc1-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file pvtool-0.3.2rc1.tar.gz.

File metadata

  • Download URL: pvtool-0.3.2rc1.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for pvtool-0.3.2rc1.tar.gz
Algorithm Hash digest
SHA256 fb5e1e903a65d11f68cc72536587f4d71eea69d39db043ead805e95ad91f9837
MD5 c74f2daf1d2a9d268a88c59684233063
BLAKE2b-256 ead5f01228c166baadf5d6c4c36df0b6f76fdfe2d7e07b869a00eccd09631e3e

See more details on using hashes here.

File details

Details for the file pvtool-0.3.2rc1-py3-none-any.whl.

File metadata

  • Download URL: pvtool-0.3.2rc1-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for pvtool-0.3.2rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 4c1fdb3e3a0833d89581f4932028664b339c20b6b34dee5a336fd0b42bd3c6aa
MD5 4a710d225fe443f2c9b704d3d952b3b6
BLAKE2b-256 630c3807cbd33e9e39df5af415d12c61bef13bdc0c51451ac33fa79ffa2201fd

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