sopel-deepl
DeepL translation plugin for Sopel IRC bots.
Installation
This plugin is released on PyPI, so it's easy to install using pip:
pip install sopel-deepl
Sopel loads all available plugins by default. If you have changed your bot to
the "enabled only" mode, edit your config file to enable
the deepl plugin or run sopel-plugins enable deepl in your terminal.
Usage
.deepl [text to translate]
# Totally-not-contrived example
<dgw> .deepl Dormez-vous?
<Sopel> [DeepL] "Are you asleep?" (FR 🡒 EN-US)
The target language can be configured globally, with overrides at the channel and user levels via IRC commands; see below.
Configuring global settings
The easiest way to configure this plugin is using Sopel's built-in wizard: In
your terminal, run sopel-plugins configure deepl and follow the prompts.
These settings are also configurable by editing the [deepl] section of your
bot's config file manually, if you choose.
[deepl]
auth_key = your_DeepL_API_key # required
default_target = FR # optional; defaults to EN-US
Refer to DeepL's list of supported target languages when
choosing a value for default_target.
Configuring user settings
# set to French
.deeplang FR
# clear user preference
.deeplang -
Users can set their preferred target language for translations using the
.deeplang command. See DeepL's supported target languages.
The special value - clears this setting.
Configuring channel settings
# set to French
.deepclang FR
# clear channel setting
.deepclang -
Channel operators and higher can set a channel's default target language,
overriding the bot's global default, using the .deepclang command. See
DeepL's list of supported target languages.
The special value - clears this setting.
Limitations
In some cases, it might be useful to pass a source-language hint along with the
input text. DeepL's language detection is fairly good when given well-formed
source material, but it can make wild incorrect guesses on "wrong" usage. (For
example, passing the earlier Dormez-vous? example without the hyphen yielded a
guessed source language of Hungarian instead of French during testing.)
sopel-deepl doesn't support such a feature yet, but it's on the radar.
Changelog
0.2.0
Added:
- Bot-level default target language setting (#3)
English is no longer the only supported translation target! 🎉 - User & channel preferences for target language (#3)
These are configured through IRC commands; see README.
Changed:
- Require Sopel 8.0+; Sopel 7.x and Python <= 3.7 are no longer supported (#1)
- Use first-party
deepllibrary instead of unofficialdeepl-api(#5)
Meta:
- Filled out README documentation (#5)
- Converted to
pyproject.tomlpackage with future-proofing (#1) - Miscellaneous code style tweaks & modernization
0.1.0
First release of sopel-deepl with basic translate-to-English functionality.
Metadata
Release files for sopel-deepl 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sopel_deepl-0.2.0.tar.gz | 6.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sopel_deepl-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.9 kB
Release files / sopel_deepl-0.2.0.tar.gz
| Download URL | sopel_deepl-0.2.0.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1248a8b15695ca024745055a2e3d9a6a74532f73e8cdabaf2c17051d68d30922
|
|
BLAKE2b-256 checksum How to use checksums |
bdb1ded167cbe5cd4cd4021b6ce19590c582c68a60d75b32b551a12b14e43737
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 1, 2025.
Transparency logRelease files / sopel_deepl-0.2.0-py3-none-any.whl
| Download URL | sopel_deepl-0.2.0-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3a23cb5eb8047f29a67146a47f935bebfbcb61c931b03823a13d4a375d77f092
|
|
BLAKE2b-256 checksum How to use checksums |
8c3cd7a921e82813fde3363fb5a11d035e8681dbc887a017435fa3d2978b81c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 1, 2025.
Transparency log