Skip to main content

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".
  • model the model you want to use. See the Notes below.
  • temperature optional 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-lite produces 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 LGPL 3.0 or later.

Metadata

Release files for gettext-translator-gemini 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gettext-translator-gemini 0.1.1
File Size Uploaded Provenance Actions
gettext_translator_gemini-0.1.1.tar.gz 17.0 kB With provenance Details for gettext_translator_gemini-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gettext-translator-gemini 0.1.1
File Interpreter ABI Platform Actions
gettext_translator_gemini-0.1.1-py3-none-any.whl Python 3 none any Details for gettext_translator_gemini-0.1.1-py3-none-any.whl

Total release size: 36.5 kB

Release files / gettext_translator_gemini-0.1.1.tar.gz

Download URL gettext_translator_gemini-0.1.1.tar.gz
Size 17.0 kB
Tags Source
SHA-256 checksum
How to use checksums
93522aa08ea6f3668fd8a70b617801ed4cf072c551ffda1a5abc31cc6617359a
BLAKE2b-256 checksum
How to use checksums
63948468b9302048c1f2d134f039a14c3649f6566b1430c27a51ae2a0e05a566
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 Oct 31, 2026.

Transparency log

Release files / gettext_translator_gemini-0.1.1-py3-none-any.whl

Download URL gettext_translator_gemini-0.1.1-py3-none-any.whl
Size 19.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a997b13592b6641c4d05bf9801bd107ff5614d3d510aae7faa72f4e128515a5
BLAKE2b-256 checksum
How to use checksums
5603b56d76f47d1cf8069713270941ab38144d4dbf628209cf2fbf954aa3a9f5
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 Oct 31, 2026.

Transparency log

Security for gettext-translator-gemini 0.1.1

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for gettext_translator_gemini-0.1.1.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 Oct 31, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page