{"id":13438997,"url":"https://github.com/driftluo/InfluxDBClient-rs","last_synced_at":"2025-03-20T06:32:05.050Z","repository":{"id":21775114,"uuid":"93997858","full_name":"driftluo/InfluxDBClient-rs","owner":"driftluo","description":"A easy-use client to influxdb","archived":false,"fork":false,"pushed_at":"2025-02-26T08:22:16.000Z","size":117,"stargazers_count":83,"open_issues_count":3,"forks_count":40,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-18T00:44:15.374Z","etag":null,"topics":["influxdb","rust"],"latest_commit_sha":null,"homepage":"https://docs.rs/influx_db_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/driftluo.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-11T10:42:43.000Z","updated_at":"2025-02-26T08:22:20.000Z","dependencies_parsed_at":"2024-10-22T21:37:57.037Z","dependency_job_id":null,"html_url":"https://github.com/driftluo/InfluxDBClient-rs","commit_stats":{"total_commits":89,"total_committers":21,"mean_commits":4.238095238095238,"dds":0.550561797752809,"last_synced_commit":"44a065a1ab30845e25c9023b725f5fa14725a928"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/driftluo%2FInfluxDBClient-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/driftluo%2FInfluxDBClient-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/driftluo%2FInfluxDBClient-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/driftluo%2FInfluxDBClient-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/driftluo","download_url":"https://codeload.github.com/driftluo/InfluxDBClient-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244565946,"owners_count":20473390,"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":["influxdb","rust"],"created_at":"2024-07-31T03:01:10.306Z","updated_at":"2025-03-20T06:32:00.042Z","avatar_url":"https://github.com/driftluo.png","language":"Rust","funding_links":[],"categories":["Libraries","库 Libraries","库"],"sub_categories":["Database","数据库 Database","数据库"],"readme":"# InfluxDBClient-rs\n\n![image](https://img.shields.io/crates/v/influx_db_client.svg)\n[![Build Status](https://api.travis-ci.org/driftluo/InfluxDBClient-rs.svg?branch=master)](https://travis-ci.org/driftluo/InfluxDBClient-rs)\n\nA easy-use client to influxdb\n\n## Overview\n\nThis is an InfluxDB driver for Rust.\n\n## Status\n\nThis project has been able to run properly, PR is welcome.\n\n## Usage\n\n### Use\n\n```\n[dependencies]\ninflux_db_client = \"^0.5.0\"\n```\n\n### http\n\n```Rust\nuse influx_db_client::{\n    Client, Point, Points, Value, Precision, point, points\n};\nuse tokio;\n\nfn main() {\n    // default with \"http://127.0.0.1:8086\", db with \"test\"\n    let client = Client::default().set_authentication(\"root\", \"root\");\n\n    let point = point!(\"test1\")\n        .add_field(\"foo\", \"bar\")\n        .add_field(\"integer\", 11)\n        .add_field(\"float\", 22.3)\n        .add_field(\"'boolean'\", false);\n\n    let point1 = Point::new(\"test1\")\n        .add_tag(\"tags\", \"\\\\\\\"fda\")\n        .add_tag(\"number\", 12)\n        .add_tag(\"float\", 12.6)\n        .add_field(\"fd\", \"'3'\")\n        .add_field(\"quto\", \"\\\\\\\"fda\")\n        .add_field(\"quto1\", \"\\\"fda\");\n\n    let points = points!(point1, point);\n\n    tokio::runtime::Runtime::new().unwrap().block_on(async move {\n        // if Precision is None, the default is second\n        // Multiple write\n        client.write_points(points, Some(Precision::Seconds), None).await.unwrap();\n\n        // query, it's type is Option\u003cVec\u003cNode\u003e\u003e\n        let res = client.query(\"select * from test1\", None).await.unwrap();\n        println!(\"{:?}\", res.unwrap()[0].series)\n    });\n}\n```\n\n### udp\n\n```Rust\nuse influx_db_client::{UdpClient, Point, Value, point};\n\nfn main() {\n    let mut udp = UdpClient::new(\"127.0.0.1:8089\");\n    udp.add_host(\"127.0.0.1:8090\");\n\n    let point = point!(\"test\").add_field(\"foo\", Value::String(String::from(\"bar\")));\n\n    udp.write_point(point).unwrap();\n}\n```\n\n## Compatibility\n\nThis is the [API Document](https://docs.influxdata.com/influxdb/v1.2/tools/api/), it may apply to version 1.0 or higher.\n\nI have tested it in version 1.0.2/1.3.5/1.5.\n\n## Thanks\n\nBecause [**influent**](https://github.com/gobwas/influent.rs) seems to have no longer updated, and only support to the 0.9 version. I read **influent.rs** and [**influxdb-python**](https://github.com/influxdata/influxdb-python) source, and then try to write a library for 1.0+ version for support for my own use.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdriftluo%2FInfluxDBClient-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdriftluo%2FInfluxDBClient-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdriftluo%2FInfluxDBClient-rs/lists"}