Example usage
>>> import translit >>> text = "La question, c’est\u202f: «\u202fOù est le cœur\u202f?\u202f»"
Downgrade text to Latin-1:
>>> translit.downgrade(text, "latin-1") "La question, c'est\xa0: «\xa0Où est le coeur\xa0?\xa0»"
Downgrade text to ASCII:
>>> translit.downgrade(text, "ascii") 'La question, c\'est : "Ou est le coeur ?"'
Downgrade and encode to Latin-1:
>>> buf = text.encode("latin-1/translit")
>>> buf
b"La question, c'est\xa0: \xab\xa0O\xf9 est le coeur\xa0?\xa0\xbb"
Decoding, the normal way:
>>> buf.decode("latin-1")
"La question, c'est\xa0: «\xa0Où est le coeur\xa0?\xa0»"
Decoding, the upgraded way:
>>> buf.decode("latin-1/translit/fr")
'La question, c’est\u202f: «\u202fOù est le cœur\u202f?\u202f»'
Installation
To install the package for Python 3, use:
$ ./setup.py install
To install the package for Python 2, use:
$ python2 setup.py install
On Windows, you may use one of the MSI binary packages provided on the download page.
Requirements
Python 3.2+ (or 2.7)
lib3to2 (if installing for Python 2)
Metadata
Release files for translit 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| translit-0.2.tar.gz | 112.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| translit-0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 226.9 kB
Release files / translit-0.2.tar.gz
| Download URL | translit-0.2.tar.gz |
|---|---|
| Size | 112.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
97b12b4dc54e154500b278e40ff8f805b3d39dbc4c2245ec7fbf71882647daa0
|
|
BLAKE2b-256 checksum How to use checksums |
1bfb200fa57fbf457ea1194f795a6a54328647dc70e9e1f0e68b03c68a6f0b3b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / translit-0.2-py3-none-any.whl
| Download URL | translit-0.2-py3-none-any.whl |
|---|---|
| Size | 114.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a341d01f26dd9de5f9892e6a35fd755aae96045f0f9c7520285008af33c7e831
|
|
BLAKE2b-256 checksum How to use checksums |
85b9b05afbdfe50cfaffa274b8a9f8d835284db80988d71f2760d6d2401d030a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Security for translit 0.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.