Skip to main content

Convert IDs into human-readable labels.

Project description

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.

Cookiecutter template project

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.

from big_corporation_inc.id_translation import translate
print(
  "The first employee at Big Corporation Inc. was:", 
  translate(1, names="employee_id"),
)

Check out this 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.

Highlighted Features

Supported types

  • Supported ID types: int, string, 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 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

id_translation-0.12.2.tar.gz (100.6 kB view details)

Uploaded Source

Built Distribution

id_translation-0.12.2-py3-none-any.whl (128.2 kB view details)

Uploaded Python 3

File details

Details for the file id_translation-0.12.2.tar.gz.

File metadata

  • Download URL: id_translation-0.12.2.tar.gz
  • Upload date:
  • Size: 100.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.7

File hashes

Hashes for id_translation-0.12.2.tar.gz
Algorithm Hash digest
SHA256 61952f1cf3ee58183e71c81ecef4ea1ab96cf13aa047c8df3c1b6c636712a012
MD5 070678cbe4dcd4a569b1a00a4e5bab2c
BLAKE2b-256 80a4e6a330c205f61e5622049238c359729f6cb1cd009be14078c3b35e36e0ea

See more details on using hashes here.

File details

Details for the file id_translation-0.12.2-py3-none-any.whl.

File metadata

File hashes

Hashes for id_translation-0.12.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f757323020fb54489ba3914cbeaed4ed24c405f1ed651ebd0e8a4229089c6a76
MD5 e25143d0ef809b2f1a8c03c4e835434c
BLAKE2b-256 5f77c0ff5f36524cb00ced9909568e850d5b5d59e0986345f86db468a9a03b7f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page