Skip to main content

traxlate — Python SDK

Official Python client for the Traxlate translation API. Every call is placeholder-safe (masks {vars}, ICU, <tags>, %s, URLs before translation, validates, restores) and runs against the authenticated, billed API (POST /api/v1/translate_batch).

pip install traxlate
from traxlate import TraxlateClient

tx = TraxlateClient(api_key="tr_live_…")          # key from traxlate.com/dashboard/api-keys

tx.translate("Hello {name}", "en", "es")          # -> "Hola {name}"
tx.translate_texts(["A", "B"], "en", "fr")        # -> ["…", "…"]
tx.localize_html(html, "de")                      # whole page, markup preserved
tx.localize_file("locales/en.json", "locales/es.json", "es")   # JSON/ARB/.strings/PO/XLIFF

For self-hosted engines, pass base_url="https://your-host".

CLI

The package also installs a traxlate-localize command for continuous file localization (change-detection cache, placeholder protection, source-side sense normalization):

traxlate-localize en.json --to es,fr,de --engine https://traxlate.com/api/v1/translate_batch

What it handles for you

  • Placeholder protection: {vars}, ICU plurals/selects, <html> tags, %s/%1$d, URLs/emails — masked, validated, restored; falls back to source on any hard failure so a broken placeholder never ships.
  • Brand/entity preservation: names, acronyms and codes are protected by the engine.
  • Formats: JSON, ARB, .strings, PO, XLIFF (extract + merge, structure-preserving).

License: MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

traxlate-1.0.0.tar.gz (45.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

traxlate-1.0.0-py3-none-any.whl (27.3 kB view details)

Uploaded Python 3

File details

Details for the file traxlate-1.0.0.tar.gz.

File metadata

  • Download URL: traxlate-1.0.0.tar.gz
  • Upload date:
  • Size: 45.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for traxlate-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a45b41b8d08e7765604425a2c9bcd9e07c472abc4cc142ff565c22348eb4512b
MD5 ae06ef8852ef8d1cf59a6d7327449fc2
BLAKE2b-256 b603194099452306d087ce17cbbddfbeaf04e10543e07ee094bd1077496d155b

See more details on using hashes here.

File details

Details for the file traxlate-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: traxlate-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 27.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for traxlate-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 730b8c1d83f962173b55d2d4108cb1b5d0fe79af0a6dbb7fbbcd778fc54cca87
MD5 c0b5758a98258b7616c8d9b1791f3e90
BLAKE2b-256 955c1f6f732c46ca93042cf37f296141970f0caef921faba7b58bfc39a0b6c4b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

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