validate configs using json schema
Project description
schematized config
Install
pip install python_schematized_config
usage
from schematized_config.core import ConfigValidator
import os
import os.path as _p
if _p.exists('.env') and 'CONFIG_VALIDATOR_JSON_SCHEMA' in os.environ:
ConfigValidator.load_dotenv() # use defaults of .env and CONFIG_VALIDATOR_JSON_SCHEMA
development
entering the development environment
assuming you have nix installed and
ready, make sure nix-command
and flake
are enabled (oneliner: run
export NIX_CONFIG="experimental-features = nix-command flakes"
in the
terminal), then enter the dev shell using nix develop
start the jupyter notebook using the provided alias or just
jupyter notebook
, and hack away
nbdev
this package is developed using nbdev, so we
use an nbdev-centric development flow. For a quick guide, we recommend
checking out the end-to-end
walkthrough. But in
short: edit notebooks, then run the nbdev_*
management commands. The
most essential flow is as follows:
- edit the notebook files (core fore core, and cli for the command line interface)
python setup.py install
# note we don’t usenbdev_install
because we managequarto
usingnix
nbdev_prepare
- run code using the package
nbdev_release
nbdev_pypi
running tests
if you share variables between cells in your test blocks, this causes
trouble during nbdev_prepare
as it tries to run cells in isolation,
leading to e.g.
NameError: name 'example_properties_schema' is not defined
to deal with this, you can merge cells that use a common variable
updating package dependencies
note that package dependencies are specified in
settings.ini; you shouldn’t be editing setup.py
by
hand. To add a requirement, add it to the requuirements
entry in
settings.ini
, then run python setup.py install
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for python-schematized-config-0.0.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0367bb06ea52303d4c381d094d1d766809185e1b865bafae89affd24722b523 |
|
MD5 | ee05d7ff308c2c71fc87ce665fdd0d14 |
|
BLAKE2b-256 | 0ab700da50c193309ceb259c0b812693a5e906a74e95a607d48f5aecbc9121c5 |
Hashes for python_schematized_config-0.0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65295b71765cb8c6eb5dc74c3a42e067cef7e4fe05314b9fa93bba7c9b11ca03 |
|
MD5 | 9b8481095b32591270506c82d5395d3f |
|
BLAKE2b-256 | 8c8a8fd23a8b3274e1eeb1e590c198acf7ea3ceac2e9819461167d9a8e9d068b |