deepl-python icon indicating copy to clipboard operation
deepl-python copied to clipboard

feat request: return consumed characters for each translation response

Open razvanioan opened this issue 3 years ago • 1 comments

It would be great if for each translation response we'd get also the number of characters used for that specific request.

Always or maybe only if a specific parameter has been set in the request.

For example, I've just realized that if I send an HTML formatted as source text, without the tag_handling parameter will consume all characters, including from the HTML structure code (tags, attributes and their values) but if I pass the tag_handling parameter these will not be counted as used.

I know that I can make use of the separate usage statistics, but it might not be relevant if I'd like to keep track of the usage of each translation, and multiple concurrent users might use my app in the same time.

Otherwise, I have to try to count the characters myself but I might not get the same result as the exact used values.

PS: this is generally available for the API, not only Python lib

razvanioan avatar Mar 27 '22 19:03 razvanioan

Hi @razvanioan,

Thank you for the feature request. Good idea, this is something we will add in future.

daniel-jones-deepl avatar Apr 06 '22 11:04 daniel-jones-deepl