adtl – another data transformation language
adtl is a data transformation language (DTL) used by some applications in Global.health, notably for the ISARIC clinical data pipeline at globaldothealth/isaric and the InsightBoard project dashboard at globaldothealth/InsightBoard
Documentation: ReadTheDocs
Installation
You can install this package using either pipx
or pip. Installing via pipx offers advantages if you want to just use the
adtl tool standalone from the command line, as it isolates the Python
package dependencies in a virtual environment. On the other hand, pip installs
packages to the global environment which is generally not recommended as it
can interfere with other packages on your system.
-
Installation via
pipx:pipx install adtl
-
Installation via
pip:python3 -m pip install adtl
If you are writing code which depends on adtl (instead of using the
command-line program), then it is best to add a dependency on adtl to your
Python build tool of choice.
To use the development version, replace adtl with the full GitHub URL:
pip install git+https://github.com/globaldothealth/adtl
Rationale
Most existing data transformation languages are usually in a XML dialect, though there are recent variations in other file formats. In addition, many DTLs use a custom domain specific language. The primary utility of this DTL is to provide a easy to use library in Python for basic data transformations, which are specified in a JSON file. It is not meant to be a comprehensive, and adtl can be used as a step within a larger data processing pipeline.
Usage
adtl can be used from the command line or as a Python library
As a CLI:
adtl parse specification-file input-file
Here specification-file is the parser specification (as TOML or JSON) and input-file is the data file (not the data dictionary) that adtl will transform using the instructions in the specification.
If adtl is not in your PATH, this may give an error. Either add the location where the adtl script is installed to your PATH, or try running adtl as a module
python3 -m adtl parse specification-file input-file
Running adtl will create output files with the name of the parser, suffixed with table names in the current working directory.
Before trying to transform your data, you can check that your specification file matches the format adtl expects, and for fields which may have been either misspelled or missed out during the mapping, by using:
adtl check specification-file input-file
Python library:
import adtl
parser = adtl.Parser(specification)
print(parser.tables) # list of tables created
for row in parser.parse().read_table(table):
print(row)
alternatively to get an output file as a CSV, similarly to the CLI:
import adtl
data = adtl.parse("specification-file", "input-file")
where data is returned as a dictionary of pandas dataframes, one for each table.
Development
Install pre-commit and setup pre-commit hooks
(pre-commit install) which will do linting checks before commit.
Metadata
Release files for adtl 0.13.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| adtl-0.13.4.tar.gz | 53.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| adtl-0.13.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 118.0 kB
Release files / adtl-0.13.4.tar.gz
| Download URL | adtl-0.13.4.tar.gz |
|---|---|
| Size | 53.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bc68ad3dda17d8dfbb5d2b7a7a13ac77d66960033dec2f2f983e1018c52b821a
|
|
BLAKE2b-256 checksum How to use checksums |
20c2470ec8018c25a861fa25fec545f86ae6c39cffee994378658c1472f3d63d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 4, 2026.
Transparency logRelease files / adtl-0.13.4-py3-none-any.whl
| Download URL | adtl-0.13.4-py3-none-any.whl |
|---|---|
| Size | 64.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
44e0be8497e5347373fa732b928f3d2f16bec6c3d6dac8e7feadd52bcbb6095e
|
|
BLAKE2b-256 checksum How to use checksums |
04875353ca5642bcf86d8bd16784ebfc3f573bf6b0e4b57d97d95a6a00938be4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 4, 2026.
Transparency log