Pull requests are always welcome. See Contributing and Code of Conduct. For a list of past changes, see CHANGELOG.md.
Currently Supported Features
- Reading and writing to InfluxDB
- Optional Serde support for deserialization
- Running multiple queries in one request (e.g.
SELECT * FROM weather_berlin; SELECT * FROM weather_london) - Writing single or multiple measurements in one request (e.g.
WriteQueryorVec<WriteQuery>argument) - Authenticated and unauthenticated connections
async/awaitsupport#[derive(InfluxDbWriteable)]derive macro for writing / reading into structsGROUP BYsupport- Tokio and async-std support (see example below) or available backends
- Swappable HTTP backends (see below)
Quickstart
Add the following to your Cargo.toml
= { = "0.8.0", = ["derive"] }
For an example with using Serde deserialization, please refer to serde_integration
use ;
use ;
async
For further examples, check out the integration tests in tests/integration_tests.rs
in the repository.
Choice of HTTP backend
To communicate with InfluxDB, you can choose the HTTP backend to be used configuring the appropriate feature. We recommend sticking with the default reqwest-based client, unless you really need async-std compatibility.
-
hyper (through reqwest, used by default), with rustls
= { = "0.8.0", = ["derive"] } -
hyper (through reqwest), with native TLS (OpenSSL)
= { = "0.8.0", = false, = ["derive", "serde", "native-tls"] } -
hyper (through reqwest), with vendored native TLS (OpenSSL)
= { = "0.8.0", = false, = ["derive", "serde", "native-tls-vendored"] }
License
@ 2020-2026 Gero Gerke, msrd0 and contributors.