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

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.5.0
File Size Uploaded Provenance Actions
id_translation-1.5.0.tar.gz 164.2 kB With provenance Details for id_translation-1.5.0.tar.gz

Built distribution (wheel)

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

Total release size: 367.4 kB

Release files / id_translation-1.5.0.tar.gz

Download URL id_translation-1.5.0.tar.gz
Size 164.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a448d72bfb22c2223b5a0e1dcedd78151b802b5aa2830f9cad56340b1ab46c0a
BLAKE2b-256 checksum
How to use checksums
8fe2e8dc2f84dddcfd9030b9adcaee05d0d18d5623af4227125d281bed6dd482
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 Nov 7, 2026.

Transparency log

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

Download URL id_translation-1.5.0-py3-none-any.whl
Size 203.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d41d5e1a4041b235dec6a1b726e17e91c5cd7517877047408b45ea44b2283109
BLAKE2b-256 checksum
How to use checksums
a2860347ead4f9a79490ceb0420a1f8b0b89fcbf88136e47e3a2c18a04410642
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 Nov 7, 2026.

Transparency log

Security for id-translation 1.5.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for id_translation-1.5.0.tar.gz

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 Nov 7, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.5.0 This release

2 release files Full provenance

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