Releases: DeepLcom/deepl-python
v1.18.0
Added
-
New language available: Arabic (
'ar'
). Add language code constants and tests.
Arabic is currently supported only for text translation; document translation
support for Arabic is coming soon.Note: older library versions also support the new language, this update only adds new code constants.
-
Added a section in the readme on how to configure retry options in
http_client.py
v1.17.0
Added
- Added
output_format
parameter for document upload function, that indicates
the file extension of the desired file format for the translated document. - Added basic usage example of the library
Fixed
- Fixed typechecking errors when using
mypy
'sstrict
mode- Thanks to derlikh-smart and vad for the report in #82
v1.16.1
v1.16.0
Added
- Add optional
context
parameter for text translation, that specifies
additional context to influence translations, that is not translated itself.
Changed
- Added notice in Readme that starting in 2024 the library will drop support for
Python versions that are officially end-of-life. - DeepL API calls now send requests with JSON-encoded bodies where possible.
Fixed
- Catch failures while constructing the user agent string.
- Added
py.typed
to the package so that our package is typed for our users. - Fixed most type errors in the package.
v1.15.0
Fixed
- Removed
CHANGELOG.md
andSECURITY.md
from the python package. TheLICENSE
file is no longer installed, but still included in package tarball and wheel files.- Thanks to TurtleWilly for the report in #66.
- Fix a dependency error in our CI by updating to a higher poetry version in most cases.
- Fix getUsage request to be a HTTP GET request, not POST.
- Change document translation to poll the server every 5 seconds. This should greatly reduce observed document translation processing time.
v1.14.0
Added
- Add example to translate JSON inputs.
- Added platform and python version information to the user-agent string that is sent with API calls, along with an opt-out.
- Added method for applications that use this library to identify themselves in API requests they make.
- Added
verify_ssl
option toTranslator
to control underlyingrequests
session SSL certification verification.- Thanks to andrefloriani for the suggestion in #60.
v1.13.0
Added
-
Add example script to translate Mustache templates.
-
Add support for storing your API Key in a keyring via the
keyring
module. -
Added a CI check for copyright headers.
-
New languages available: Korean (
'ko'
) and Norwegian (bokmål) ('nb'
). Add language code constants and tests.Note: older library versions also support the new languages, this update only adds new code constants.
Fixed
- Copyright headers are updated for 2023
Security
- Update
certifi
to resolve security advisory.certifi
is a development-only dependency; library users are unaffected.
v1.12.0
Added
- State explicitly that this library supports Python 3.11.
- Added the
should_retry
andhttp_status_code
properties to all exceptions
thrown by the library.
Fixed
- Fix
py
dependency by upgradingpytest
version to 7.2.0 for Python 3.7+.
For Python 3.6 testspytest
needs to be added manually. - Remove unused
tox
dependency. - Update
coverage
dependency. - Also send options in API requests even if they are default values.
v1.11.0
Added
- Add formality options
'prefer_less'
and'prefer_more'
.
Changed
- Requests resulting in
503 Service Unavailable
errors are now retried.
Attempting to download a document before translation is completed will now
wait and retry (up to 5 times by default), rather than raising an exception.
v1.10.0
Added
-
New language available: Ukrainian (
'uk'
). Add language code constant and tests.Note: older library versions also support new languages, this update only adds new code constant.
Changed
- Add note and workaround to README about Poetry error on Ubuntu 22.04.
- Pull request #48 thanks to FOehlschlaeger.