ID Translation
Convert IDs to human-readable labels.
Country IDs translated using the standard id:name-format. Click here for source.
What is it?
A package suite for translating IDs typically found in databases. Translation is highly configurable and tested for multiple different SQL dialects and schema naming paradigms. The included TOML configuration format as well as the support functions make it easy to create and share working configurations with anyone who needs them.
Getting started
The fastest way to get started with id-translation is the 🍪id-translation-project Cookiecutter template. It is
designed to allow power users to quickly specify shared configurations that "just work" for other users; see the example
below.
# Generated by: cookiecutter https://github.com/rsundqvist/id-translation-project.git
from big_corporation_inc.id_translation import translate
print(
"The first employee at Big Corporation Inc. was:",
translate(1, names="employee_id"),
)
The template generates an installable {your_namespace}.id_translation module, with functions such as the one used
above. Check out the demo project
(and its 📚generated documentation) to get a preview of what your
generated project might look like, or continue to the next section for a brief feature overview.
Already have an application that maps IDs by hand? See the migration guide instead -- it walks through adding
id-translation to an existing codebase.
Highlighted Features
- Convenient interface: Translator.translate().
- Intuitive Format strings (e.g.
'{id}:{name}'), including full Format Specification Mini-Language support. Extensions for optional keys. - Fetchers for SQL and local or remote file-system sources.
- Powerful Name-to-source and Placeholder-to-column mapping and name extraction.
- Configurable using TOML - see the 🍪id-translation-project Cookiecutter template.
Supported types
- Supported ID types:
int,str, andUUID. Optional heuristics for UUID-like strings. - Supports translation of built-in collections:
list,dict,set,tuple. - Supports translation of pandas types, including
pandas.MultiIndextypes. - Optional and user-extensible integration of data types, such as polars, pyarrow, and dask.
Installation
The package is published through the Python Package Index (PyPI). Source code is available on GitHub: https://github.com/rsundqvist/id-translation
pip install -U id-translation
This is the preferred method to install id-translation, as it will always install the
most recent stable release.
License
Documentation
Hosted on Read the Docs: https://id-translation.readthedocs.io
Contributing
All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome. To get started, see the Contributing Guide and Code of Conduct.
Metadata
Release files for id-translation 1.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| id_translation-1.4.1.tar.gz | 149.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| id_translation-1.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 342.3 kB
Release files / id_translation-1.4.1.tar.gz
| Download URL | id_translation-1.4.1.tar.gz |
|---|---|
| Size | 149.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0ccc79b426d5ca334f66762d973cc56de3e81846729c98551d0505d1fee48b74
|
|
BLAKE2b-256 checksum How to use checksums |
97d4452be0351ae889c127363e857010225d57853009d49c3774ca152f1663d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Oct 3, 2026.
Transparency logRelease files / id_translation-1.4.1-py3-none-any.whl
| Download URL | id_translation-1.4.1-py3-none-any.whl |
|---|---|
| Size | 193.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bb0fccf38f896aad906ae5603ffcbc8330526350d6874fe2bc752dfd14a5ec06
|
|
BLAKE2b-256 checksum How to use checksums |
27c3a4a5e45e95d521f33636a51cf71c16deb5a2fc702bbef1c77ab29fbd048b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Oct 3, 2026.
Transparency log