deepl

Crates.iodeepl
lib.rsdeepl
version0.7.3
created_at2022-09-18 11:37:45.086814+00
updated_at2025-12-01 14:18:29.486283+00
descriptionA Rust implementation of the DeepL API
homepage
repositoryhttps://github.com/Avimitin/deepl-rs
max_upload_size
id668579
size120,419
Jiongjia Lu (Avimitin)

documentation

https://docs.rs/deepl

README

DeepL Api

github crates.io docs.rs

deepl-rs is a web request library for making requests to the DeepL API endpoint easier. It provides types wrapping to help developer gain correctness confidence.

Usage

[dependencies]
deepl = "0.7"
use deepl::{DeepLApi, Lang};

let api = DeepLApi::with("YOUR AUTH KEY").new();
let translated = api.translate_text("Hello World", Lang::ZH).await.unwrap();

let sentences = translated.translations;
assert_eq!(sentences[0].text, "你好,世界");

Read examples for more usage.

Collaboration

If you find any bugs in this project or feel confused about any part of the code, feel free to open new issue.

DeepL API rapidly update and change, and this crate can't catch up in-time. Feel free to file new issue if deepl-rs mismatch with the DeepL API.

If you want to submit some code modification but don't know how to setup the code environment, you can follow the Nix Installation and enable flakes support. Then simply run nix develop in the project root, all the build dependencies will setup for you.

License

MIT

Commit count: 157

cargo fmt