Skip to main content

Translate API - Python SDK

Official Python SDK for Translate API.

🚀 Quick Start (For Beginners)

Step 1: Get Your API Key

  1. Go to https://translate-api.com
  2. Click "Login" or "Get Started"
  3. Create an account (it's free to start!)
  4. Go to your Dashboard
  5. Click "Create API Key"
  6. Copy your API key - you'll need it!

Step 2: Install the SDK

Open your terminal/command prompt and run:

pip install translate-api-client

Step 3: Use It!

from translate_api import TranslateAPI

# Replace 'your-api-key' with your actual API key from translate-api.com
client = TranslateAPI('your-api-key')

# Translate to one language
result = client.translate('Hello world', 'es')
print(result['translations']['es'])  # Output: "Hola mundo"

# Translate to multiple languages at once
result = client.translate('Hello world', ['es', 'fr', 'de'])
print(result['translations'])
# Output: {'es': 'Hola mundo', 'fr': 'Bonjour le monde', 'de': 'Hallo Welt'}

📖 Full API Reference

Constructor

client = TranslateAPI(api_key, base_url='https://translate-api.com/v1')
  • api_key (required): Your API key from translate-api.com
  • base_url (optional): Custom API URL

translate(text, target_language)

Translate text to one or more languages.

Parameters:

  • text: The text you want to translate
  • target_language: A language code ('es') or list of codes (['es', 'fr'])

Returns: Dictionary with translation results

translate_batch(items)

Translate multiple texts at once.

results = client.translate_batch([
    {'text': 'Hello', 'target_language': 'es'},
    {'text': 'Goodbye', 'target_language': 'fr'}
])

🌍 Supported Languages

Visit translate-api.com/documentation for a full list.

Common codes: en, es, fr, de, it, pt, zh, ja, ko, ar

❓ Need Help?

📝 License

MIT License

Metadata

Release files for translate-api-client 1.0.0

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

Source distribution (sdist)

Source distribution for translate-api-client 1.0.0
File Size Uploaded Provenance Actions
translate_api_client-1.0.0.tar.gz 4.3 kB Without provenance Details for translate_api_client-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for translate-api-client 1.0.0
File Interpreter ABI Platform Actions
translate_api_client-1.0.0-py3-none-any.whl Python 3 none any Details for translate_api_client-1.0.0-py3-none-any.whl

Total release size: 8.7 kB

Release files / translate_api_client-1.0.0.tar.gz

Download URL translate_api_client-1.0.0.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7c18dcce911023146d9466831b16aac5334a9f8d56fe9a3cb737a74d50f035fa
BLAKE2b-256 checksum
How to use checksums
0ea122e3c02f71b4cc6f92c81300521950206129765cdd52a8c316a0e4e7224e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.6

Release files / translate_api_client-1.0.0-py3-none-any.whl

Download URL translate_api_client-1.0.0-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
74a820aea4ae48a545398b541eaac9821566333b4fba7bde79d18c4c1ef4ab6f
BLAKE2b-256 checksum
How to use checksums
48a66b805e8766c037a16a0de0c06f02479b7c2e8d93ab4fa0a8b69b92557ce2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.6

Security for translate-api-client 1.0.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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No 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