{"id":29287532,"url":"https://github.com/ctiedt/influx_client","last_synced_at":"2025-07-06T01:40:56.305Z","repository":{"id":62440916,"uuid":"341001673","full_name":"ctiedt/influx_client","owner":"ctiedt","description":"A Rust library to interact with InfluxDB","archived":false,"fork":false,"pushed_at":"2023-01-24T21:12:14.000Z","size":30,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-09T01:57:58.723Z","etag":null,"topics":["database","influxdb","influxdb-client","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/influx-client","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ctiedt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-21T20:53:45.000Z","updated_at":"2022-02-03T14:24:07.000Z","dependencies_parsed_at":"2023-02-14T01:32:01.524Z","dependency_job_id":null,"html_url":"https://github.com/ctiedt/influx_client","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ctiedt/influx_client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctiedt%2Finflux_client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctiedt%2Finflux_client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctiedt%2Finflux_client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctiedt%2Finflux_client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ctiedt","download_url":"https://codeload.github.com/ctiedt/influx_client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctiedt%2Finflux_client/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263837080,"owners_count":23517922,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","influxdb","influxdb-client","rust"],"created_at":"2025-07-06T01:40:49.878Z","updated_at":"2025-07-06T01:40:56.282Z","avatar_url":"https://github.com/ctiedt.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# influx_client\n[![crates-badge](https://img.shields.io/crates/v/influx_client?style=for-the-badge)](https://crates.io/crates/influx_client) [![docs-badge](https://img.shields.io/docsrs/influx-client/latest?style=for-the-badge)](https://docs.rs/influx_client)\n\nA Rust library to interact with [InfluxDB](https://www.influxdata.com/) databases.\nIt is still early in development, so expect bugs and missing features.\n\n## Things that work\n\n- Writing data to a bucket\n- Querying data in a certain time range (only relative so far)\n- Using filters in queries\n\n## Examples\n\nWriting to a bucket:\n\n```rust\nuse std::{collections::HashMap, time::SystemTime};\n\nuse influx_client::{\n    Client, InfluxError, Precision, WriteQuery,\n};\n\nfn main() -\u003e Result\u003c(), InfluxError\u003e {\n    let client = Client::from_env(\"http://localhost:8086\").expect(\"INFLUXDB_TOKEN not set\");\n    let mut tags = HashMap::new();\n    tags.insert(\"t1\", \"v1\");\n    tags.insert(\"t2\", \"v2\");\n    let data = WriteQuery {\n        name: \"test\",\n        tags,\n        field_name: \"i\",\n        value: 42,\n        timestamp: Some((SystemTime::now(), Precision::ns)),\n    };\n\n    client.insert(\"home\", \"home\", Precision::ms, data)?;\n}\n\n```\n\nReading from a bucket:\n\n```rust\nuse influx_client::{\n    flux::functions::{NumericFilter, Range, StringFilter},\n    Client, InfluxError, Precision, ReadQuery,\n};\n\nfn main() -\u003e Result\u003c(), InfluxError\u003e {\n    let client = Client::from_env(\"http://localhost:8086\").expect(\"INFLUXDB_TOKEN not set\");\n    \n    let q = ReadQuery::new(\"home\")\n        .range(Range::new(Some((-12, Precision::h)), None))\n        .filter(StringFilter::Eq(\"_measurement\", \"test\"))\n        .filter(NumericFilter::Lt(\"_value\", 99));\n\n    println!(\"{}\", client.get(\"home\", q)?);\n    Ok(())\n}\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctiedt%2Finflux_client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fctiedt%2Finflux_client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctiedt%2Finflux_client/lists"}