Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mseri/xapitodict
Import raw xml xapi database dumps into python dictionaries or json
https://github.com/mseri/xapitodict
python xapi xml-database
Last synced: 2 months ago
JSON representation
Import raw xml xapi database dumps into python dictionaries or json
- Host: GitHub
- URL: https://github.com/mseri/xapitodict
- Owner: mseri
- License: other
- Created: 2017-07-12T11:13:56.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-05-12T18:26:23.000Z (over 2 years ago)
- Last Synced: 2023-06-09T01:16:00.615Z (over 1 year ago)
- Topics: python, xapi, xml-database
- Language: Python
- Size: 27.3 KB
- Stars: 3
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
- License: LICENSE
Awesome Lists containing this project
README
# 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 setup.py install` (or `python setup.py 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.