Skip to main content

DeepL Translator CLI without API Key

Project description

deepl-cli

Release Package PyPI version Code Coverage CI Maintainability

image

Note: This project works without DeepL API key. With DeepL API, use DeepLcom/deepl-python

Install

pip install deepl-cli

Usage

CLI

deepl -F en -T ja -s <<<'This tool is useful for me.'
# このツールは私にとって便利だ。
deepl -F ja -T en -s <<<'このツールは私にとって便利だ。'
# This tool is useful for me.

curl https://example.com | sed -nr '/^<body>/,/<\/body>/s/<[^>]+>//gp' | tr -d \\n > txt
deepl -f txt -F en -T ja
# 例文ドメイン このドメインは、文書の例文に使用するためのものです。事前の調整や許可を得ることなく、このドメインを文献で使用することができます。   詳細はこちら
$ deepl -h
usage: deepl [-h] (-f PATH | -s) -F FR -T TO [-t MS] [-v] [-V]

DeepL Translator CLI without API Key

options:
  -h, --help        show this help message and exit
  -f, --file PATH   source text file to translate (default: None)
  -s, --stdin       read source text from stdin (default: False)
  -F, --fr FR       input language (default: None)
  -T, --to TO       output language (default: None)
  -t, --timeout MS  timeout interval (default: 5000)
  -v, --verbose     make output verbose (default: False)
  -V, --version     show program's version number and exit

valid languages of `-F` / --fr`:
{'cs', 'fr', 'ru', 'hu', 'zh', 'da', 'nl', 'es', 'lv', 'nb', 'de', 'ko', 'it', 'pt', 'pl', 'et', 'ar', 'el', 'en', 'id', 'sv', 'ro', 'ja', 'uk', 'bg', 'sk', 'fi', 'tr', 'sl', 'lt'}

valid languages of `-T` / `--to`:
{'cs', 'fr', 'ru', 'hu', 'zh', 'da', 'nl', 'en-gb', 'es', 'lv', 'nb', 'de', 'ko', 'it', 'pt', 'zh-hans', 'pl', 'et', 'pt-br', 'ar', 'el', 'en', 'id', 'sv', 'ro', 'ja', 'uk', 'bg', 'en-us', 'sk', 'zh-hant', 'pt-pt', 'fi', 'tr', 'sl', 'lt'}

Package

from deepl import DeepLCLI

deepl = DeepLCLI("en", "ja")
deepl.translate("hello") #=> "こんにちわ"

If you use with asyncio, Use DeepLCLI.translate_async. See examples/async.py.

License

MIT

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

deepl_cli-2.3.0.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

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

deepl_cli-2.3.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file deepl_cli-2.3.0.tar.gz.

File metadata

  • Download URL: deepl_cli-2.3.0.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for deepl_cli-2.3.0.tar.gz
Algorithm Hash digest
SHA256 85f224e502c8d19684a316ea2fcab9fe4a41d325db50ee227f2f0fc7be05fea4
MD5 d5702ce02f0049c2bfab01f8d05a0234
BLAKE2b-256 0df6ecf5e9918535de30ecbc416128af5e7188359a569c8b170b9b976765e477

See more details on using hashes here.

File details

Details for the file deepl_cli-2.3.0-py3-none-any.whl.

File metadata

  • Download URL: deepl_cli-2.3.0-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for deepl_cli-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6dfed7c4d21f8bd1caeb10d87098c7d4deca1381da1ca67a77f0e27d34364b2b
MD5 2f8ae415433907c96aab05bc68f186cb
BLAKE2b-256 167dbfee50f5c0bb23941e3cd9095758ae09e6aba9bad0df49171ea1b6c7c302

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