Skip to main content

ID Translation

Convert IDs to human-readable labels.


PyPI - Version PyPI - Python Version Tests Codecov Read the Docs PyPI - License


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

Supported types

  • Supported ID types: int, str, and UUID. Optional heuristics for UUID-like strings.
  • Supports translation of built-in collections: list, dict, set, tuple.
  • Supports translation of pandas types, including pandas.MultiIndex types.
  • 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

MIT

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.2

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

Source distribution (sdist)

Source distribution for id-translation 1.4.2
File Size Uploaded
id_translation-1.4.2.tar.gz 155.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for id-translation 1.4.2
File Interpreter ABI Platform
id_translation-1.4.2-py3-none-any.whl Python 3 none any Details

Total release size: 349.9 kB

Release files / id_translation-1.4.2.tar.gz

Download URL id_translation-1.4.2.tar.gz
Size 155.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9f41221966ce1068e150a20d12bb8422786fc7dddbd76fc3adfb0810ec4b6ef9
BLAKE2b-256 checksum
How to use checksums
0633b63339210410fa7ef538cbbf851adf1f48d35b3b3af40712571f1247c4a2
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 10, 2026.

Transparency log

Release files / id_translation-1.4.2-py3-none-any.whl

Download URL id_translation-1.4.2-py3-none-any.whl
Size 194.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba30451a131aa820d879c2cc0315cc6de37541af79ae61b0620e086dc0b25a76
BLAKE2b-256 checksum
How to use checksums
5bef4b6943ffc68359aad049e18fcf7d7840e21018c5ad7dce2483552e22b996
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 10, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.4.2 This release

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.15.4

2 release files

0.15.3

2 release files

0.15.2

2 release files

0.15.1

2 release files

0.15.0

2 release files

0.14.1

2 release files

0.12.2

2 release files

0.12.1

2 release files

0.12.0

2 release files

0.11.1

2 release files

0.11.0

2 release files

0.10.2

2 release files

0.10.1

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

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