Skip to main content

mkstd

Make standards that can be exported/imported/validated via HDF5/JSON/XML/YAML.

mkstd uses pre-existing standards for validation and schema specification, such that files produced using mkstd can be used independently of mkstd. For example, a tool developer can use mkstd to create a standard for their tool's data, but users do not necessarily need mkstd installed to use the data. However, mkstd also provides importers and exporters, so intended use also involves an mkstd installation for convenience.

Installation

pip install mkstd

# For HDF5 support
pip install hdfdict@git+https://github.com/SiggiGue/hdfdict

For environments requiring numpy<2, replace mkstd with mkstd[numpyv1] above.

Intended use

mkstd is intended to be used at two stages of data management. An example of these stages is provided in .

Generating a standard

At this stage, the "user" is the person designing the data type and corresponding standard. For example, a tool developer who wants to standardize the data produced by their tool. The steps could look like:

  1. (with mkstd) Design the data type as a Pydantic data model. Thanks to Pydantic, it behaves like a standard for your data, as a Python object.
  2. (with mkstd) Export the standard as e.g. XML and JSON schemas.
  3. (TODO, with mkstd) Generate documentation for the standard, based on the Pydantic data model docstrings.

Using a standard

At this stage, the "user" is someone who wants to use data generated by the tool, or import their own data into the tool.

  1. (with or without mkstd) Reformat data to match the standard specified by the e.g. mkstd-generated XML or JSON schema.
  2. (with or without mkstd) Validate the data against the schema.
  3. (with or without mkstd) Import/export the reformatted data with the tool.

External validation

As written above, many uses of the standard produced by mkstd are intended to be possible without an mkstd installation. This is because the generated standards are in standardized schema formats. Below are the different formats supported by mkstd, and how to use/validate standards/data independently of mkstd.

XML

The XSD format is used. Search the web for validate xml data against schema.

JSON

The official JSON schema format is used. Search the web for validate json data against schema.

YAML

There is no official YAML schema format, so YAML data is typically validated against JSON schemas. mkstd takes this approach too. Hence, tools that can validate YAML data against a JSON schema can be used, without an mkstd installation.

For example, the pajv tool can be used to validate YAML data against a JSON schema, without mkstd.

pajv validate -s output/mkstd_generated_schema.yaml -d output/data.yaml

By default, mkstd stores the schemas for YAML standards in YAML too.

HDF5

There is currently no standard available for the specification of HDF5 schemas. Hence, the HDF5 files produced by mkstd can only be validated with mkstd.

There is a format for HDF5 that enables interconversion with JSON. This is out-of-scope.

Metadata

Release files for mkstd 0.0.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mkstd 0.0.12
File Size Uploaded
mkstd-0.0.12.tar.gz 17.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mkstd 0.0.12
File Interpreter ABI Platform
mkstd-0.0.12-py3-none-any.whl Python 3 none any Details

Total release size: 33.4 kB

Release files / mkstd-0.0.12.tar.gz

Download URL mkstd-0.0.12.tar.gz
Size 17.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b9dec74f056d9f50555411bd6835bffe62511ceac029fbacf0848a898d464d66
BLAKE2b-256 checksum
How to use checksums
b3cbc7198a43d908e50cd13d69fe7562e4abce669718e46a62b7d1a30a81c540
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.2

Release files / mkstd-0.0.12-py3-none-any.whl

Download URL mkstd-0.0.12-py3-none-any.whl
Size 16.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
65375bfcb5a910aa545f5ecdcaa677f20e66b2c7eace66b3b100c90e0cf2889d
BLAKE2b-256 checksum
How to use checksums
394152e9a5ceee8c0a724733e571aec5b0d0a2fb0e65ddacf3b0f894247d1311
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.2

Release history Release notifications | RSS feed

0.0.13

2 release files

This release

0.0.12 This release

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page