Skip to main content

Heimdall - Heurist XML connector

License Project status PyPI - Python Version GitLab - Latest release Documentation Build status Code coverage

What is this?

Heimdall is a tool for converting more easily one or more databases from one format to another. It leverages modules called “connectors”, responsible for conversion of data between specific databases schemas and the HERA format.

This repository contains a connector to Heurist’s own XML export format (HML).

Why should I use it?

You can use this connector, along with the pyheimdall software, to retrieve any data exported from Heurist. You can then aggregate this data into your research corpus easily, for example using other Heimdall connectors.

Take note, however that some legal restrictions might apply to data retrieved from any scientific database.
Plus, if at the end of your project, you share your data, please cite the original data properly.

How can I use it?

Setup

This pyHeimdall connector is available as a PyPI package named pyheimdall-heurist. You can install it using the pip package manager:

pip install pyheimdall-heurist

You can use pip to either upgrade or uninstall this connector, too:

pip install --upgrade pyheimdall-heurist
pip uninstall pyheimdall-heurist

Usage

import heimdall

db = heimdall.getDatabase(format='heurist:api', url=…, login=…, password=…)
heimdall.createDatabase(db, format='csv', url='.')  # or any other format

Please note that you shouldn’t use pyheimdall-heurist functions directly. As long as the package is installed on your system, pyHeimdall will automatically discover its features and allow you to use them as long as any other default or external connector.

Is it tested?

Well, yes… and no.

As you can see in our badge list, or in this coverage report, the code coverage by our unit tests is not too shabby.

The heurist:api format is tested each week, so it’ll work… until Heurist will make it break. Then, you’ll at least know if you can rely on it using the pipeline badge just up there.

However, to validate the heurist:xml format behaviour, tests take the file /tests/resources/heurist.xml as an input, which simulates an exported XML (“HML”) file from Heurist. Said file was exported… in 2025.
And this is where the problem lies.
At the time of writing (early 2025), Heurist IMHO still has a… kinda “lax” attitude towards third party integration, developper experience, and is full of undocumented behaviours. Among these, the “HML” file remains unspecified, the link to its XSD is broken, and Heurist doesn’t even behave as expected, when one feeds it its own output. So, this connector really tries its best to deduce how stuff seems to work in most cases.
This as two limits, though:
  • First, those assumptions can be wrong, or incomplete. Still at the time of writing, the Heurist core development team seems unable to document its own output, so… well.

  • Second, even if everything seems fine today in your eyes, the Heurist core development team is known to force unto its userbase new (sometimes breaking) updates without any prior notice, documentation or regression testing. Of course, this means that the /test/resources/heurist.xml file may become outdated with time, and this connector won’t automagically warn you of any problem.

Unit testing with a static test file is, of course, not ideal. But (you know the drill: “at time of writing”) Heurist is devoid of any machine-usable API, let alone RESTful. So there isn’t really any other choice. As you may understand, seemingly by design of its own creator, third party softwares trying to be interoperable with Heurist are just… well, f•••ed.
To conclude: depending on when you read this, you can install this connector, try to load a recently exported XML (HML) file with heimdall.getDatabase(format='heurist:xml', …), or directly import your database with heimdall.getDatabase(format='heurist:api', …). It _should_ work; if it doesn’t work, you’re probably f•••ed, too.
That is, unless you contribute, of course.

How can I contribute?

PyHeimdall welcomes any feedback or proposal. See here for details.

Are there any alternatives?

Yup. There is the Heurist API & Data Pipeline, which allows you to free up your data from Heurist and export it to DuckDB or CSV.

There are many other tools, self-managed or not, with functional scopes comparable to Heurist. For example these days, people seem to enjoy Grist, or Omeka if you’re into CDNs. As it happens, there is a heimdall connector for both: pyheimdall-grist and pyheimdall-omeka.

License

GNU Affero General Public License version 3.0 or later

Metadata

Release files for pyheimdall-heurist 1.3.0

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

Source distribution (sdist)

Source distribution for pyheimdall-heurist 1.3.0
File Size Uploaded Provenance
pyheimdall_heurist-1.3.0.tar.gz 20.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pyheimdall-heurist 1.3.0
File Interpreter ABI Platform
pyheimdall_heurist-1.3.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 42.2 kB

Release files / pyheimdall_heurist-1.3.0.tar.gz

Download URL pyheimdall_heurist-1.3.0.tar.gz
Size 20.5 kB
Tags Source
SHA-256 checksum
How to use checksums
3625a90e9c8e086c0130052aa99b6b9d69ad84f6b16b2b0fe730c61df65c0530
BLAKE2b-256 checksum
How to use checksums
9f4fc6cc88333548894c8b3c202090f56eae0ba06bd225c6898cfae942dca66e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.11

Release files / pyheimdall_heurist-1.3.0-py2.py3-none-any.whl

Download URL pyheimdall_heurist-1.3.0-py2.py3-none-any.whl
Size 21.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
2211e025fefe77a7aa5bbf81ccc49f11bbe49c3d2e442732b1464134d56cc42b
BLAKE2b-256 checksum
How to use checksums
a90d8a3ec68f413a560f2266967a833c176749cd9abfbed34aa0ea957d3318f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.11

Security for pyheimdall-heurist 1.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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