Skip to main content

A ClaML reader for Python.

Project description

Build status codecov PyPI PyPI - Downloads

A ClaML reader for Python. Generated from the ClaML.dtd file from the DIMDI, using PyXB.


Reads classification files in ClaML format (XML) into Python objects. See examples/ for a usage example.



To use ClaML reader in a project:

import python_claml


Read and parse the contents of a ClaML file and print all class codes:

with open(file_name, 'r') as input_file:
    # Read file contents
    contents =
    # Parse ClaML document
    classification: ClaML = claml.CreateFromDocument(contents)
    for cls in classification.Class:


The code was generated using the following commands:

pyxbgen --schema-root=../resources -u ClaML.xsd -m python_claml.claml


From the package index:

pip install python-claml

or from source:

git clone
cd python_claml
pip install .


python test


This project was funded by the German Ministry of Education and Research (BMBF) as part of the project DIFUTURE - Data Integration for Future Medicine within the German Medical Informatics Initiative (grant no. 01ZZ1804D).


Copyright (c) 2019 The Hyve B.V.

The ClaML reader is licensed under the MIT License. See the file LICENSE.

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

python_claml-0.1.1.tar.gz (18.0 kB view hashes)

Uploaded source

Built Distribution

python_claml-0.1.1-py2.py3-none-any.whl (18.5 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page