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

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.

Metadata

Release files for onixcheck 0.9.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 onixcheck 0.9.12
File Size Uploaded
onixcheck-0.9.12.tar.gz 1.2 MB Details

Built distribution (wheel)

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

Total release size: 2.4 MB

Release files / onixcheck-0.9.12.tar.gz

Download URL onixcheck-0.9.12.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
4f214e7ab93e58836bc89fd9b313cbaf38fd959395e5ce6020d4d3589c5aa311
BLAKE2b-256 checksum
How to use checksums
4a6ad186d68d427369eea2e3df188eb0590bb1d129302a33042f4957034d1650
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","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.12-py3-none-any.whl

Download URL onixcheck-0.9.12-py3-none-any.whl
Size 1.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
000f71eab70eb905ae53c94dab52a3b7b9bc96f79908f0367fbb93db2aa1b616
BLAKE2b-256 checksum
How to use checksums
2537dbae863400ffd09c9609bacb74d6febe3602966e2f07290748124afba5b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","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.12 This release

2 release files

0.9.11

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