Skip to main content

polylingo (Python)

Python client for the PolyLingo translation API.

Requires Python 3.9+.

Install

pip install polylingo

Sync client

import os
import polylingo

client = polylingo.PolyLingo(
    api_key=os.environ["POLYLINGO_API_KEY"],
    # base_url="https://api.usepolylingo.com/v1",
    # timeout=120.0,
)

result = client.translate(content="# Hello", targets=["es", "fr"], format="markdown")
print(result["translations"]["es"])
client.close()
with polylingo.PolyLingo(api_key="...") as client:
    print(client.languages())

Async client

import polylingo

async with polylingo.AsyncPolyLingo(api_key="...") as client:
    r = await client.translate(content="Hi", targets=["de"])

API

Same names on PolyLingo and AsyncPolyLingo (async methods are awaited).

Area Notes
health() GET /health
languages() GET /languages
translate(...) POST /translate
batch(...) POST /translate/batch
usage() GET /usage
jobs.create(...) POST /jobs (202 body)
jobs.get(job_id) GET /jobs/:id
jobs.translate(...) Submit and poll (poll_interval, timeout, on_progress)

Exceptions

PolyLingoError (status, error, message string). AuthError (401), RateLimitError (429, retry_after), JobFailedError (job_id).

Documentation

Python SDK on usepolylingo.com

Repository

github.com/UsePolyLingo/polylingo-python

License

MIT

Metadata

Release files for polylingo 0.1.3

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

Source distribution (sdist)

Source distribution for polylingo 0.1.3
File Size Uploaded Provenance Actions
polylingo-0.1.3.tar.gz 6.5 kB With provenance Details for polylingo-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for polylingo 0.1.3
File Interpreter ABI Platform Actions
polylingo-0.1.3-py3-none-any.whl Python 3 none any Details for polylingo-0.1.3-py3-none-any.whl

Total release size: 20.0 kB

Release files / polylingo-0.1.3.tar.gz

Download URL polylingo-0.1.3.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
73dc7e8872f7920667dffbbc218ec273436d38cc626c5fab395b8a118e94d503
BLAKE2b-256 checksum
How to use checksums
c7f361c3cc7f15d31f1be095a25e2a5c1f255748016e0bc402ee888b4df1fc87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 10, 2026.

Transparency log

Release files / polylingo-0.1.3-py3-none-any.whl

Download URL polylingo-0.1.3-py3-none-any.whl
Size 13.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3faf93e2854fac7abcc836acc79924bc57c48bf0916cc08a78160bc4b7a5314c
BLAKE2b-256 checksum
How to use checksums
4037d920c8408d2f9240237651489aa01c804de515388b83791ef1fc1791ec80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 10, 2026.

Transparency log

Security for polylingo 0.1.3

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 polylingo-0.1.3.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 Apr 10, 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.

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