How deepl/deepl-python works
This repository is a Python client library and CLI for DeepL’s language API. Applications or CLI users submit text or documents through DeepLClient; the library sends requests to DeepL and returns translated or improved results. It also exposes language and usage queries, glossary and style-rule management, and translation-memory workflows. The sampled sources establish the client, transport, and data-model layers; some feature-specific wiring is inferred only at the documented capability level, so uncertain links are omitted.
Main entry points: deepl_client.py DeepL client · translator.py Translation API · http_client.py HTTP transport · __main__.py Command-line interface
Components 16
User interfaces
- Command-line interface
deepl/__main__.py - DeepL client
deepl/deepl_client.py
Translation workflows
- Translation API
deepl/translator.py - Text translation
deepl/translator.py - Document translation
deepl/translator.py - Text improvement
deepl/deepl_client.py
Language resources
- Glossary management
deepl/deepl_client.py - Style rules
deepl/deepl_client.py - Translation memories
deepl/deepl_client.py - Languages and usage
deepl/translator.py
Client runtime
- API data models
deepl/api_data.py - HTTP transport
deepl/http_client.py - Exceptions
deepl/exceptions.py
Other components
- Python application
- CLI user
- DeepL API
Connections 18
- CLI user → Command-line interface: runs commands
- Command-line interface → DeepL client: calls client
- Python application → DeepL client: calls client
- DeepL client → Translation API: extends
- Translation API → Text translation: provides
- Translation API → Document translation: provides
- DeepL client → Text improvement: provides
- DeepL client → Glossary management: manages
- DeepL client → Style rules: manages
- DeepL client → Translation memories: manages
- Translation API → Languages and usage: provides
- Translation API → HTTP transport: sends requests
- DeepL client → HTTP transport: sends requests
- HTTP transport → DeepL API: HTTP exchange
- Translation API → API data models: builds results
- DeepL client → API data models: builds results
- Translation API → Exceptions: raises
- DeepL client → Exceptions: raises