Skip to main content

Python SDK for FluentC Translation API

Project description

FluentC Python SDK

A lightweight Python SDK for interacting with the FluentC Translation API — an AI-powered translation and language detection service designed for real-time, batch, and multilingual content workflows.

🚀 Installation

pip install fluentc-sdk

🔐 Authentication

All API requests require an API key (your Site UUID). You can obtain your API key from your FluentC dashboard.

from fluentc_sdk import FluentCClient

client = FluentCClient(api_key="your-site-uuid")

⚡ Quickstart

Translate Text

result = client.translate(
    input_text="Hello, how are you?",
    input_format="text",
    target_language="es",
    source_language="en",
    mode="real-time"
)
print(result["translation"])

Detect Language

lang = client.detect_language(input_text="Bonjour tout le monde", input_format="text")
print(lang)

Get Available Languages

langs = client.get_languages()
print(langs)

Get Batch Translation Results

result = client.get_results(job_id="abc123jobid456")
print(result)

📘 API Methods

Method Description
translate() Translate text or HTML content, in real-time or batch mode
detect_language() Auto-detect language of text or HTML
get_results() Retrieve batch translation results using job ID
get_languages() List available target and source languages

❗ Error Handling

All API errors raise FluentCAPIError. Example:

from fluentc_sdk.exceptions import FluentCAPIError

try:
    client.translate("Hello", "text", "xx")
except FluentCAPIError as e:
    print(f"Error: {e.message}")

🧪 Development

Install locally:

pip uninstall fluentc-sdk
pip install .

Build:

python setup.py sdist bdist_wheel

Publish:

twine upload dist/*

📄 License

MIT License

🔗 Useful Links

Project details


Download files

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

Source Distribution

fluentc_sdk-0.1.0.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

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

fluentc_sdk-0.1.0-py3-none-any.whl (2.1 kB view details)

Uploaded Python 3

File details

Details for the file fluentc_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: fluentc_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.4

File hashes

Hashes for fluentc_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 89de8bdcddba9a5e640d9f73c7ffe8a20e6cc125671a25efb68279ceb009695d
MD5 1f9dabb89883f143bdde9cf80bcb968d
BLAKE2b-256 e522ea27a4a8a2ca6309f4c557445d53c7e1321a5ec7190e4849d13c2db921d5

See more details on using hashes here.

File details

Details for the file fluentc_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fluentc_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.4

File hashes

Hashes for fluentc_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b0b9a674d983ec00d429ce41c97c17c44fb18e1e66ed2628e42c931f253a0432
MD5 3ebd4e52485350eb9b76e50b5507de78
BLAKE2b-256 1e9a490d2e928018c2b9552cd716c85a08a2ba27d5fdd079335a551cf850403e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page