gettext-translator-gemini
Gemini API backend for gettext-translator.
Usage from gettext-translator
gettext-translator --backend gemini --config gemini-sample.yaml --src en --dst de_DE --po /path/to/example/messages.po
This command translates the messages.po file from English into German, using Gemini. See the gemini-sample.yaml configuration file for the example.
Configuration
apikey- Your Gemini API key.
- Or, if you prefix the string with "env:", the value of the environment variable with the same name will be used. Example: apikey="env:MY_GEMINI_API_KEY" and then in the shell
export MY_GEMINI_API_KEY="the_api_key".
modelthe model you want to use. See the Notes below.temperatureoptional parameter to control the fidelity of the translation. Default: 0.3.
Installation
pip install "gettext-translator[gemini]"
Notes
- You can find the name of the Gemini models and their pricing here.
- Of course, you need a Google AI Studio API key.
- There is a free layer for certain models, for example
gemini-2.5-flash-lite. Otherwise, Google may require you to pay. gemini-2.5-flash-liteproduces good results, as far as I have tested. It is available in the free layer.
License
Copyright (C) 2026 Rodolfo González González.
Licensed under GPL 3.0.
Metadata
Release files for gettext-translator-gemini 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 | |
|---|---|---|---|---|
| gettext_translator_gemini-0.1.0.tar.gz | 3.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gettext_translator_gemini-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.2 kB
Release files / gettext_translator_gemini-0.1.0.tar.gz
| Download URL | gettext_translator_gemini-0.1.0.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
19edbc11c8796f1da10b6687cd31258266f2d65fa778935e902f2325328b0f12
|
|
BLAKE2b-256 checksum How to use checksums |
daa71571d2f34573dd2eba193d4aa1141dc0caff00a020f64a1b82464e3db8a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Release files / gettext_translator_gemini-0.1.0-py3-none-any.whl
| Download URL | gettext_translator_gemini-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
85602d5da8e09244ba5b25a7a5b03f762e7a5419c923b427024326fff397e200
|
|
BLAKE2b-256 checksum How to use checksums |
1d9928995b8e57d260fffb08859fe172d6e45bb2e2ec2c4db29d94b712c5801b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Security for gettext-translator-gemini 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.