gettextpo
Python bindings for the GNU gettext PO file library, built with Rust and PyO3.
Overview
gettextpo provides direct access to libgettextpo, the GNU gettext library for parsing and manipulating PO (Portable Object) translation files. This package enables you to read, write, and programmatically edit PO files with full access to message metadata, comments, and validation.
Installation
pip install gettextpo
Build from source
This package requires the gettext development libraries and Rust toolchain.
# Install dependencies (Debian/Ubuntu)
apt-get install libgettextpo-dev
# Install dependencies (macOS)
brew install gettext
# Build and install
pip install maturin
maturin develop
Quick Start
from gettextpo.lib import PoFile, PoHeader
# Read an existing PO file
po = PoFile.read("messages.po")
# Or load from a string
po = PoFile.load("""
msgid "Hello"
msgstr "Bonjour"
""")
# Access domains and headers
for domain in po.domains():
header = po.domain_header(domain)
po_header = PoHeader(header)
print(f"Content-Type: {po_header['Content-Type']}")
# Iterate over messages
for domain in po.domains():
for message in po.messages(domain):
# Access message properties via the low-level API
pass
Features
- Read and write PO files
- Access and modify message headers
- Iterate over translation messages
- Support for plural forms
- Handle translator and extracted comments
- Track file positions for messages
- Manage obsolete and fuzzy message flags
- Format string validation
API Reference
PoFile
PoFile.create()- Create a new empty PO filePoFile.read(filename)- Read a PO file from diskPoFile.load(contents)- Load a PO file from a stringpo.domains()- List all domains in the filepo.domain_header(domain)- Get the header for a domainpo.messages(domain)- Iterate over messages in a domain
PoHeader
PoHeader(header)- Create a header wrapperheader[field]- Get a header field valueheader[field] = value- Set a header field valueheader.render()- Get the header as a string
Requirements
- Python 3.12 or later
- libgettextpo (gettext development library)
Release
Run the Release workflow from master:
gh workflow run release.yml --ref master -f version_bump=patch
The run bumps the version in Cargo.toml, Cargo.lock and pyproject.toml, pushes the version commit to master together with the annotated tag v<version>, builds the wheels and the sdist from that tag, publishes them to PyPI with trusted publishing (environment pypi), and creates the GitHub Release.
License
GPL-3.0-or-later
Metadata
Release files for gettextpo 0.1.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 | Actions |
|---|---|---|---|---|
| gettextpo-0.1.2.tar.gz | 26.4 kB | With provenance | Details for gettextpo-0.1.2.tar.gz |
Built distributions (wheels)
Total release size: 10.3 MB
Release files / gettextpo-0.1.2.tar.gz
| Download URL | gettextpo-0.1.2.tar.gz |
|---|---|
| Size | 26.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c55882fe902bca3d08d3d0b3d5f5a454630ad828118371cb05afea5897c0a4a
|
|
BLAKE2b-256 checksum How to use checksums |
372437028913c889d90772ea24a064b0eaf7672ad3baeb53b85754dcfe856566
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 28, 2026.
Transparency logRelease files / gettextpo-0.1.2-pp312-pypy312_pp80-manylinux_2_28_x86_64.whl
| Download URL | gettextpo-0.1.2-pp312-pypy312_pp80-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | Linux glibc 2.28+ x86-64 PyPy 3.12 PyPy 3.12 8.0 |
|
SHA-256 checksum How to use checksums |
a2c7475c04e2df6dae2c0ab432ce648c747983e9af2754fa1e44de059422e102
|
|
BLAKE2b-256 checksum How to use checksums |
2f11ecb936e2791fd107f5ced13848803635c3de2cef35d4c1819dcb1ed38cf7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 28, 2026.
Transparency logRelease files / gettextpo-0.1.2-cp315-cp315t-manylinux_2_28_x86_64.whl
| Download URL | gettextpo-0.1.2-cp315-cp315t-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.15 CPython 3.15 free-threading Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
70439004f95d9f0fdf67a4974844e21e19723b61f42017b519649fb731c01a3f
|
|
BLAKE2b-256 checksum How to use checksums |
8aeaa6432b0c8235da6f426139c014a45f889940d7b3b9e468b61eaa26cc779c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 28, 2026.
Transparency logRelease files / gettextpo-0.1.2-cp315-cp315t-macosx_11_0_arm64.whl
| Download URL | gettextpo-0.1.2-cp315-cp315t-macosx_11_0_arm64.whl |
|---|---|
| Size | 263.3 kB |
| Tags | CPython 3.15 CPython 3.15 free-threading macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7c3c2e2a48535c76e285d14b56326301fda937fee09edc7654abe7dc911e3f31
|
|
BLAKE2b-256 checksum How to use checksums |
4ea1e5617a3234427c0f8a51a29f31bc1f710ca956b097f0d0c63e00a6f886cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 28, 2026.
Transparency logRelease files / gettextpo-0.1.2-cp315-cp315t-macosx_10_12_x86_64.whl
| Download URL | gettextpo-0.1.2-cp315-cp315t-macosx_10_12_x86_64.whl |
|---|---|
| Size | 266.7 kB |
| Tags | CPython 3.15 CPython 3.15 free-threading macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
78be8a5140311623fbc8ac70ca7e9ae6ecf7043e3c54005ec2ccf439a6775a51
|
|
BLAKE2b-256 checksum How to use checksums |
0fdbb6d3b7706d4ef5a9e16cd7b25df150ed51df345eb25163ecfcd88c8536d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 28, 2026.
Transparency logRelease files / gettextpo-0.1.2-cp315-cp315-manylinux_2_28_x86_64.whl
| Download URL | gettextpo-0.1.2-cp315-cp315-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.15 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
3433f57ac53f170d53424ce8776211094b4e0992f821e19feabfd008ecb91070
|
|
BLAKE2b-256 checksum How to use checksums |
a5b3a011afa32eca4caf975441a6475693e9473997733edcb8f010d1c1a1e3fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 28, 2026.
Transparency logRelease files / gettextpo-0.1.2-cp315-cp315-macosx_11_0_arm64.whl
| Download URL | gettextpo-0.1.2-cp315-cp315-macosx_11_0_arm64.whl |
|---|---|
| Size | 265.4 kB |
| Tags | CPython 3.15 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
b023b5844473a9d1c9f0b48c2b70dda8bf3ae37acecfbe087670aa43cbdc8982
|
|
BLAKE2b-256 checksum How to use checksums |
4c1ee7f7f39a5aaa8f4fd59f2479fb31c262aa2253ab9d5f244b055738b5db73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 28, 2026.
Transparency logRelease files / gettextpo-0.1.2-cp315-cp315-macosx_10_12_x86_64.whl
| Download URL | gettextpo-0.1.2-cp315-cp315-macosx_10_12_x86_64.whl |
|---|---|
| Size | 268.1 kB |
| Tags | CPython 3.15 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
2687a06fcadfa8b791ff9dbade80000a76aa3930f9b0fc6665f7d4ef8d34f740
|
|
BLAKE2b-256 checksum How to use checksums |
99421fcdf8a6f3bf37118722f1087f1c6e5e697e34d722ba62fa8a5cf2bbd44c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 28, 2026.
Transparency logRelease files / gettextpo-0.1.2-cp314-cp314t-manylinux_2_28_x86_64.whl
| Download URL | gettextpo-0.1.2-cp314-cp314t-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
95d0da188ea63cfee243e7f16343b7d14b1e55eaf25859298e9b908f41660f23
|
|
BLAKE2b-256 checksum How to use checksums |
7bb11751b9773dd4948d2a3a571b3ffc57402f3e3e3b0d731f91e87a47bf9f1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 28, 2026.
Transparency logRelease files / gettextpo-0.1.2-cp314-cp314-manylinux_2_28_x86_64.whl
| Download URL | gettextpo-0.1.2-cp314-cp314-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.14 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
80bfe29cdd0c451d565a74a8e03874974f8923b0206981b6aebd6afaeb7209da
|
|
BLAKE2b-256 checksum How to use checksums |
c83a75b4bcec3bd259b6e6fe71dd58c1c6207846e63974f98985b95648b253dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 28, 2026.
Transparency logRelease files / gettextpo-0.1.2-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | gettextpo-0.1.2-cp314-cp314-macosx_11_0_arm64.whl |
|---|---|
| Size | 265.0 kB |
| Tags | CPython 3.14 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
28412414155d4b625d2da456aa18d5981c1923da7c6eaa7c8e1a19d482bc264f
|
|
BLAKE2b-256 checksum How to use checksums |
fabc09d4616bca9f01048a711260eadf5b38b64f9ebd7be5591bff750f977b79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 28, 2026.
Transparency logRelease files / gettextpo-0.1.2-cp314-cp314-macosx_10_12_x86_64.whl
| Download URL | gettextpo-0.1.2-cp314-cp314-macosx_10_12_x86_64.whl |
|---|---|
| Size | 267.7 kB |
| Tags | CPython 3.14 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
49c1c039e775e0233948403cf61baf713c74dbec2020afe9c8733ba5651013a0
|
|
BLAKE2b-256 checksum How to use checksums |
d30eed6d22bf14a0d8884894cab663fec53846733db66caafaf7d5cf63bc2e83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 28, 2026.
Transparency logRelease files / gettextpo-0.1.2-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | gettextpo-0.1.2-cp313-cp313-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.13 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
3a1b69becff154bb06b92e0eec989faf257a83527c40599530fa93d5d7bf7cdd
|
|
BLAKE2b-256 checksum How to use checksums |
d0700dddc1dfa587fc63ab24dc6978bfe06f305485e449f477d31b344bbd8b7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 28, 2026.
Transparency logRelease files / gettextpo-0.1.2-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | gettextpo-0.1.2-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 263.2 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
45a6d09121e8fd850165bc7140c768b5131168b6342bfbbd418a8c6c55b46d8e
|
|
BLAKE2b-256 checksum How to use checksums |
0ebbecb1ecafe0b47cef129a337d154263b42e435d5f5cddd610ff5c574e8b0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 28, 2026.
Transparency logRelease files / gettextpo-0.1.2-cp313-cp313-macosx_10_12_x86_64.whl
| Download URL | gettextpo-0.1.2-cp313-cp313-macosx_10_12_x86_64.whl |
|---|---|
| Size | 265.8 kB |
| Tags | CPython 3.13 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
cd412177669c2cb95bb2a0ca323c5a7fd3280734489661a200e3b4374ffe72e2
|
|
BLAKE2b-256 checksum How to use checksums |
96af784e32419a5a244e28dec81b044aca7718bcc3f1295b34e8bd7eded9e7c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 28, 2026.
Transparency logRelease files / gettextpo-0.1.2-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | gettextpo-0.1.2-cp312-cp312-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
ca6e019ac0da4a7760faf1be8583b27c4ab5e57debd1f3f6b4147153d36cd274
|
|
BLAKE2b-256 checksum How to use checksums |
41fa9c0edcbb4627f627a45050ad9f38034490ce3c7a50b674505ba9a2cdaa08
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 28, 2026.
Transparency logRelease files / gettextpo-0.1.2-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | gettextpo-0.1.2-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 264.0 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
484a75fd2bffdcbd4a7b5380df379b8d3464093d98a1c9e45aef7a53de402000
|
|
BLAKE2b-256 checksum How to use checksums |
4155a0212cf4eaa89a3d254af9734ac0ff9b71f253e30b564e63e8dd1568af50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 28, 2026.
Transparency logRelease files / gettextpo-0.1.2-cp312-cp312-macosx_10_12_x86_64.whl
| Download URL | gettextpo-0.1.2-cp312-cp312-macosx_10_12_x86_64.whl |
|---|---|
| Size | 266.5 kB |
| Tags | CPython 3.12 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
83249e61faea92f9c32a1a18bf09afa254057267faafbe388b3fa23e067280e9
|
|
BLAKE2b-256 checksum How to use checksums |
ae69be70552f72dea9e22962d6206661180454cf34eb65e5d28d73e00a542814
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 28, 2026.
Transparency logSecurity for gettextpo 0.1.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.
Full provenance
All 18 files in this release have been uploaded with provenance metadata.
Attestation for gettextpo-0.1.2.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 28, 2026.
Transparency logA 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.