deepl-python  by DeepLcom

Python SDK for DeepL translation API

created 4 years ago
1,251 stars

Top 32.2% on sourcepulse

GitHubView on GitHub
Project Summary

This Python library provides a convenient interface to the DeepL API for text and document translation, as well as text rephrasing. It is designed for developers building applications that require high-quality, AI-powered language translation, offering features like formality control, glossary support, and document translation in various formats.

How It Works

The library interacts with the DeepL API via HTTP requests, abstracting the complexities of API calls. It supports text translation with optional source language detection, formality adjustment, and context/glossary integration. Document translation is handled by uploading files, polling for completion, and downloading the translated output. The library also exposes the "Write API" for text rephrasing with style and tone options.

Quick Start & Requirements

  • Install via pip: pip install --upgrade deepl
  • Requirements: Python 3.6-3.11 (Python 3.8+ recommended for future compatibility).
  • Authentication key required from DeepL.
  • Official documentation: https://github.com/DeepLcom/deepl-python

Highlighted Details

  • Supports text and document translation, including various document formats.
  • Enables text rephrasing with controllable style and tone.
  • Offers advanced features like custom glossaries for term consistency and formality control.
  • Includes a command-line interface for direct usage.

Maintenance & Community

  • Actively maintained by DeepL.
  • Issues and pull requests are welcomed via GitHub.

Licensing & Compatibility

  • License: MIT.
  • Compatible with commercial and closed-source applications.

Limitations & Caveats

  • Requires an API key, which may incur costs beyond the free tier.
  • Some advanced features like formality control are language-pair specific.
  • Ubuntu 22.04 users may need to install python3-cachecontrol to resolve a ModuleNotFoundError.
Health Check
Last commit

1 month ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
3
Star History
40 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.