llm-po-translator
Automatically translate Django .po files via LLM — Anthropic (Claude) or Groq (Llama).
- Skips already-translated entries
- Strips venv/site-packages pollution
- Rate limit detection: silences output after 3 consecutive 429s, counts silently, re-run to resume
- Auto-detects language from path (
locale/es/LC_MESSAGES/django.po→es) - Works as a CLI or a Django management command
Install
pip install llm-po-translator # no provider (bring your own)
pip install 'llm-po-translator[groq]' # + Groq
pip install 'llm-po-translator[anthropic]' # + Anthropic
pip install 'llm-po-translator[all]' # both
Setup
Set your API key and provider in your environment (or .env):
LLM_PROVIDER=groq # anthropic | groq
LLM_API_KEY=gsk_... # Groq key (gsk_...) or Anthropic key (sk-ant-...)
Usage
CLI
# Auto-detect language from path
llm-po-translate locale/es/LC_MESSAGES/django.po
# Explicit language
llm-po-translate locale/es/LC_MESSAGES/django.po es
# Override provider
llm-po-translate locale/ja/LC_MESSAGES/django.po --provider anthropic
# Verbose (raw API errors)
llm-po-translate locale/fr/LC_MESSAGES/django.po --verbose
Django management command
Add llm_po_translator to INSTALLED_APPS:
INSTALLED_APPS = [
...
"llm_po_translator",
]
Then:
# Auto-discover all locale/*/LC_MESSAGES/django.po
python manage.py translate_po
# Single file
python manage.py translate_po locale/es/LC_MESSAGES/django.po
# Override provider
python manage.py translate_po --provider groq
Providers
| Provider | Model | Install |
|---|---|---|
anthropic |
claude-haiku-4-5-20251001 | pip install anthropic |
groq |
llama-3.3-70b-versatile | pip install groq |
License
MIT
Metadata
Release files for llm-po-translator 0.1.0
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 |
|---|---|---|---|---|
| llm_po_translator-0.1.0.tar.gz | 6.9 kB | Without provenance | Details for llm_po_translator-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llm_po_translator-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for llm_po_translator-0.1.0-py3-none-any.whl |
Total release size: 17.3 kB
Release files / llm_po_translator-0.1.0.tar.gz
| Download URL | llm_po_translator-0.1.0.tar.gz |
|---|---|
| Size | 6.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0b8d1f8ca717ec36abd95f3006a4559ae37b3f0f937f30ba798dd4e21ab3027a
|
|
BLAKE2b-256 checksum How to use checksums |
735a6e444d3e6d5682747746a48c86aba5805531253ebe44172cd925433d0ac7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.17.0 {"ci":null,"cpu":"arm64","distro":{"name":"macOS","version":"26.5"},"implementation":{"name":"CPython","version":"3.10.20"},"installer":{"name":"hatch","version":"1.17.0"},"openssl_version":"OpenSSL 3.6.1 27 Jan 2026","python":"3.10.20","system":{"name":"Darwin","release":"25.5.0"}} HTTPX2/2.3.0
|
Release files / llm_po_translator-0.1.0-py3-none-any.whl
| Download URL | llm_po_translator-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
616b99dd51214a8019e746e0951f5b4562e8c3482688af8080d3c12c7ad1e9ad
|
|
BLAKE2b-256 checksum How to use checksums |
d45c669037e377d2e9e682e0395c8e95c490527d4f808de3d814ac70bad86839
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.17.0 {"ci":null,"cpu":"arm64","distro":{"name":"macOS","version":"26.5"},"implementation":{"name":"CPython","version":"3.10.20"},"installer":{"name":"hatch","version":"1.17.0"},"openssl_version":"OpenSSL 3.6.1 27 Jan 2026","python":"3.10.20","system":{"name":"Darwin","release":"25.5.0"}} HTTPX2/2.3.0
|
Security for llm-po-translator 0.1.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.
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.