Python lib/cli for JSON/YAML schema validation, fork of pykwalify with added features
Project description
pykwalifire
pykwalifire is a fork of the YAML/JSON validation library pykwalify. It adds the following features.
New features
Specify custom file extensions for YAML and JSON data files [1.7.0]
In order to be able to validate JSON or YAML files with non-default file extensions, the following two options have been introduced:
-y EXT, --yaml-extension EXT to specify a custom extension EXT, allowing to validate YAML files such as my-yaml-file.yext.
-j EXT, --json-extension EXT to specify a custom extension EXT, allowing to validate JSON files such as my-json-file.jext.
Support Python 3.x exclusively [2.0.1]
pykwalifire drops support for Python 2.7. Python 2.x will not be maintained past 2020, and its default ascii encoding makes it a nightmare for unicode support. To be able to use pykwalifire you must use it with Python 3.
Default ruamel YAML parser [2.0.1]
As PyYAML, the most widely used YAML parser in the Python world, does not support YAML 1.2, ruamel.yaml is the default parser for pykwalifire.
History
Cf. pykwalify.
Installation
pykwalifire is available from PyPI: https://pypi.python.org/pypi/pykwalifire.
Install it with
pip install pykwalifire
Basic usage
Create a data file. JSON and YAML formats are both supported.
- foo
- bar
Create a schema file with validation rules.
type: seq
sequence:
- type: str
Validate the file from the command line:
pykwalifire -d data.yaml -s schema.yaml
If the YAML data file would be called data.customextension, you would validate it with
pykwalifire -d data.customextension -s schema.yaml -y customextension
Documentation
For further documentation, please see the pykwalify documentation.
License
pykwalifire is licensed under the MIT license, cf. license file.
pykwalify branch
The pykwalify branch is used to create pull requests against the upstream repository. Hopefully this way all work that’s been done in pykwalifire can be contributed back to the original project.
Thanks @Grokzen for creating a great piece of open source software!
Change Log
2.0.1 (2017-12-20)
1.7.3 (2017-12-18)
1.7.2 (2017-12-18)
1.7.1 (2017-12-18)
1.7.0 (2017-12-13)
1.6.0 (2017-01-22)
1.5.2 (2016-11-12)
1.5.1 (2016-03-06)
1.5.0 (2015-09-30)
1.4.1 (2015-08-27)
1.4.0 (2015-08-04)
1.3.0 (2015-07-13)
1.2.0 (2015-05-19)
1.1.0 (2015-04-04)
1.0.1 (2015-03-08)
1.0.0 (2015-03-08)
15.01 (2015-01-17)
14.12 (2014-12-24)
14.08 (2014-08-24)
14.06.1 (2014-06-23)
14.06 (2014-06-07)
0.1.2 (2013-01-26)
v0.1.1 (2013-01-21)
v0.1.0 (2013-01-20)
* This Change Log was automatically generated by `github_changelog_generator <https://github.com/skywinder/Github-Changelog-Generator>`__
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
Built Distribution
File details
Details for the file pykwalifire-2.0.1.tar.gz
.
File metadata
- Download URL: pykwalifire-2.0.1.tar.gz
- Upload date:
- Size: 51.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebf7dcaa53dbe43238ebf1cc3b89471c29276b6e188ae9ff329ea69b2f1288e4 |
|
MD5 | f0fb11bdeb261da6b61b4d80797ca141 |
|
BLAKE2b-256 | bbbe815089e00344528779f7bc4a78e352a42b1e80bb4ead1c7cb1df20931ed0 |
File details
Details for the file pykwalifire-2.0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: pykwalifire-2.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 26.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b83f1b3cbc2cf8ee9bb665b389168aa1a803755f2ba65344137d1a9fe88bc8b6 |
|
MD5 | dac2e7c070438490fda7f8303ba62e0f |
|
BLAKE2b-256 | 606dbba1b8c3db8cdf2236819431883859f9226f89156afb72364b94d9233752 |