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

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.1
File Size Uploaded
id_translation-1.4.1.tar.gz 149.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for id-translation 1.4.1
File Interpreter ABI Platform
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 log

Release 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

Release history Release notifications | RSS feed

1.4.2

2 release files

This release

1.4.1 This release

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