Skip to main content

gettext-translator-chatgpt

ChatGPT API backend for gettext-translator.

Usage from gettext-translator

gettext-translator --backend chatgpt --config sample-chatgpt.yaml --src en --dst fr_CA --po /path/to/example/messages.po

This command translates the messages.po file from English into Canadian French (fr_CA), using the provided OpenAI API key, using the gpt-4o-mini model processing 100 translations per batch. Very good results are produced by this model, which is a cheap one. See the chatgpt-sample.yaml configuration file for the example.

Configuration

  • apikey
    • Your OpenAI ChatGPT 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_OPENAI_API_KEY" and then in the shell export MY_OPENAI_API_KEY="sk-...".
  • model the model you want to use. See the Notes below.

Installation

pip install "gettext-translator[chatgpt]"

Notes

  • You can find the name of the OpenAI ChatGPT models and their pricing here.
  • Of course, you need an OpenAI API key.

License

Copyright (C) 2026 Rodolfo González González.

Licensed under LGPL 3.0 or later.

Metadata

Release files for gettext-translator-chatgpt 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-chatgpt 0.1.1
File Size Uploaded Provenance Actions
gettext_translator_chatgpt-0.1.1.tar.gz 17.0 kB With provenance Details for gettext_translator_chatgpt-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 36.5 kB

Release files / gettext_translator_chatgpt-0.1.1.tar.gz

Download URL gettext_translator_chatgpt-0.1.1.tar.gz
Size 17.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6d497a5ab44bf3cb9988b5124788f00d022dc296459e5f1b96b154b9296a4a13
BLAKE2b-256 checksum
How to use checksums
37563c9f927978b7e0bd32296f3ec54036c775107be5a186a00cca43796123d4
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_chatgpt-0.1.1-py3-none-any.whl

Download URL gettext_translator_chatgpt-0.1.1-py3-none-any.whl
Size 19.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d4c955b124a4c5eb4e14cb0332c6f4e37964da8619a31f1889755764d63444e
BLAKE2b-256 checksum
How to use checksums
d2cc38b61150f4e8ce49eca910d72fd3115aed10d399cc5a0288dd601af86889
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-chatgpt 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_chatgpt-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