Releases: DeepLcom/deepl-python
v1.16.0
Added
- Add optional
contextparameter 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.typedto the package so that our package is typed for our users. - Fixed most type errors in the package.
v1.15.0
Fixed
- Removed
CHANGELOG.mdandSECURITY.mdfrom the python package. TheLICENSEfile 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_ssloption toTranslatorto control underlyingrequestssession 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
keyringmodule. -
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
certifito resolve security advisory.certifiis a development-only dependency; library users are unaffected.
v1.12.0
Added
- State explicitly that this library supports Python 3.11.
- Added the
should_retryandhttp_status_codeproperties to all exceptions
thrown by the library.
Fixed
- Fix
pydependency by upgradingpytestversion to 7.2.0 for Python 3.7+.
For Python 3.6 testspytestneeds to be added manually. - Remove unused
toxdependency. - Update
coveragedependency. - 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 Unavailableerrors 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.
v1.9.0
Added
- Add
Translator.create_glossary_from_csv()allowing glossaries downloaded
from website to be easily uploaded to API.
v1.8.0
v1.7.0
Added
-
New languages available: Indonesian (
'id') and Turkish ('tr'). Add language code constants and tests.Note: older library versions also support the new languages, this update only adds new code constants.
-
Add
limit_reachedandany_limit_reachedproperties toUsageobject
returned byget_usage(). -
Add
Translator.translate_document_wait_until_done()to poll translation
status until translation is complete or fails. -
Add
auth_key_is_free_account()utility function.
Changed
- Improve readme usage examples.
Deprecated
- Deprecate
limit_exceededandany_limit_exceededproperties ofUsage
object returned byget_usage(), uselimit_reachedandany_limit_reached
instead.