Skip to main content

Onixcheck - Book Trade Metadata Validation

PyPI Package PyPI Downloads DeepWiki

Introduction

ONIX for Books is an international XML standard for the publishing and book trade industry.

onixcheck is a Python library and command line tool for validating ONIX metadata. It allows you to validate ONIX versions 2.1, 3.0, and 3.1 against the official XML Schema.

  • Free software: Apache License 2.0

Installation

Using uv (Recommended)

For the fastest and most reliable installation, we recommend using the uv tool:

uv tool install onixcheck

Using pip

If you have Python or PyPy installed on your system:

pip install onixcheck

Windows Binary

For Windows users who prefer not to install Python, standalone executables are available on the GitHub Releases page.

Quickstart

Command line usage examples

Validate all .xml, .onx, .onix files in current directory:

onixcheck

Validate a single onix file:

onixcheck myonixfile.xml

Validate all .xml files in /onixdata and its subdirectories:

onixcheck --path /onixdata --ext xml --recursive

Enable debug information (more detailed error output):

onixcheck myonixfile.xml --debug

Show help:

onixcheck -h

Using onixcheck as a Python library

Simple usage with onixcheck.validate:

import onixcheck

errors = onixcheck.validate("src/onixcheck/data/invalid_onix3_ref.xml")
print(errors[0].short)
ERROR - SCHEMASV - invalid_onix3_ref.xml:4:0 - Element 'SentDateTime': This element is not expected. Expected is ( Sender ).

errors is either a list of Message objects (INVALID file) or an empty list (VALID file)

Custom schema validation

You can specify custom schema types for validation:

import onixcheck

errors = onixcheck.validate("myfile.xml", schemas=("xsd", "rng", "google"))

Contributions and suggestions are welcome. Please feel free to open issues or pull requests on GitHub.

Release files for onixcheck 0.9.11

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

Source distribution (sdist)

Source distribution for onixcheck 0.9.11
File Size Uploaded
onixcheck-0.9.11.tar.gz 1.2 MB Details

Built distribution (wheel)

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

Total release size: 2.4 MB

Release files / onixcheck-0.9.11.tar.gz

Download URL onixcheck-0.9.11.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
3e89103f31cc906d2d6b49ba690a947d27fc98531b4fa2174737e8bba8e8f6f0
BLAKE2b-256 checksum
How to use checksums
21924153f80d3fb44947fa82d0d143ad7dde7d38df71a4983fc20bccc51ba657
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / onixcheck-0.9.11-py3-none-any.whl

Download URL onixcheck-0.9.11-py3-none-any.whl
Size 1.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
8c5270b5964073a19505dc87ea574a5112a5c24b9bff7efff793ccd7d1de340a
BLAKE2b-256 checksum
How to use checksums
3d8c90a4b614fb6d93ad1f616dd7700842ed310a914331986fed72465ec8818d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.9.11 This release

2 release files

0.9.10

2 release files

0.9.9

2 release files

0.9.8

2 release files

0.9.7

2 release files

0.9.6

2 release files

0.9.5

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

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