A standalone JSON Schema based validator for XDI files used to save XAS data aiming to be fully compliant with the XDI/1.0 specification..
Project description
XDI-Validator
A standalone JSON Schema based validator for XDI files used to save XAS data aiming to be fully compliant with the XDI/1.0 specification..
Usage
As simple as it gets :
# import the functionality from the module
from xdi_validator import validate, XDIEndOfHeaderMissingError
# open the xdi file
with open('filename.xdi', 'r') as xdi_document:
# Validate the file. If there is no end-of-header token
# an exception is raised
try:
xdi_errors, xdi_dict = validate(xdi_document)
except XDIEndOfHeaderMissingError as ex:
print(ex.message)
# check if there are errors
if xdi_errors:
print('XDI is invalid!')
for error in xdi_errors:
print(error)
else:
print('XDI is valid!')
print(xdi_dict)
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xdi_validator-1.0.3b0.tar.gz.
File metadata
- Download URL: xdi_validator-1.0.3b0.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79e1099e868c1f17a80c162c1b9a48904af7e2679a4d4d21c0d13428994e3977
|
|
| MD5 |
ea67e60a747cae855a3e88eb42230bbf
|
|
| BLAKE2b-256 |
52929fbc07509cbdd795eae489120510e3d59e2fe09983f1c667a626a368cc0a
|
File details
Details for the file xdi_validator-1.0.3b0-py3-none-any.whl.
File metadata
- Download URL: xdi_validator-1.0.3b0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5274d58a9f7c473e454f222ce27053cc636fce223f9ec453f728662733577143
|
|
| MD5 |
c8a6394b654764208fd246069ac68090
|
|
| BLAKE2b-256 |
3073e5bd3fc4fc372386681496d3eac7a9016b6e62083807a8cc6843ec8e66d9
|