Import raw xml xapi database dumps into python dictionaries or json
Find a file
Marcello Seri d105d635fc
Merge pull request #8 from snwoods/update-readme
Update the README.md as setup.py has been removed
2025-11-26 17:04:01 +01:00
xapitodict Packaging: replace setup.py with pyproject 2025-07-10 09:46:17 +01:00
.gitignore update gitignore 2017-07-12 14:09:31 +01:00
CHANGELOG Update CHANGELOG 2022-05-12 20:26:02 +02:00
LICENSE Add LICENSE and README 2017-07-12 12:08:48 +01:00
pyproject.toml Packaging: replace setup.py with pyproject 2025-07-10 09:46:17 +01:00
README.md Update the README.md as setup.py has been removed 2025-11-26 11:23:49 +00:00

XAPI to dict (and to json)

xapitodict is a library to extract the a xapi db dump into a python dictionary for ease of analysis and debugging investigation.

CLI

If you are more comfortable using other tools (e.g. jq) it also provides an executable, xapi-to-json to load the xml database and dump it into as json into a file or the standard output. For additional information run xapi-to-json --help.

Python Module

If you import xapitodict in your python (or jupyter) session, you have access to the following function:

xapi_to_dict: xml_database_path -> (xapi_db_dict, xapi_db_version_dict)

This takes the path of a xml xapi db dump and returns the database dictionary and the version metadata dictionary.

Requirements

The library is compatible with python 2.7 and python 3.

The packages sexpdata and xmltodict are required. They are both available on pypi and installable via pip or easy_install.

Install

Run either of:

  • python -m pip install (or python -m pip install --user if you prefer a local install)

  • pip install . (or pip install --user . if you prefer a local install)

Make sure that the binary install path is in your env path.