VOOZH about

URL: https://www.nuget.org/packages/InfluxDB3.Client/

⇱ NuGet Gallery | InfluxDB3.Client 1.9.0




👁 Image
InfluxDB3.Client 1.9.0

dotnet add package InfluxDB3.Client --version 1.9.0
 
 
NuGet\Install-Package InfluxDB3.Client -Version 1.9.0
 
 
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="InfluxDB3.Client" Version="1.9.0" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="InfluxDB3.Client" Version="1.9.0" />
 
Directory.Packages.props
<PackageReference Include="InfluxDB3.Client" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add InfluxDB3.Client --version 1.9.0
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: InfluxDB3.Client, 1.9.0"
 
 
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package InfluxDB3.Client@1.9.0
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=InfluxDB3.Client&version=1.9.0
 
Install as a Cake Addin
#tool nuget:?package=InfluxDB3.Client&version=1.9.0
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

<p align="center"> <img src="net_logo.svg" alt=".NET Logo" width="150px"> </p> <p align="center"> <a href="https://www.nuget.org/packages/InfluxDB3.Client"> <img src="https://buildstats.info/nuget/InfluxDB3.Client" alt="NuGet Badge"> </a> <a href="https://influxcommunity.github.io/influxdb3-csharp/"> <img src="https://img.shields.io/badge/-docfx-blue?logo=csharp&logoColor=white" alt="docfx"> </a> <a href="https://github.com/InfluxCommunity/influxdb3-csharp/actions/workflows/codeql-analysis.yml"> <img src="https://github.com/InfluxCommunity/influxdb3-csharp/actions/workflows/codeql-analysis.yml/badge.svg?branch=main" alt="CodeQL analysis"> </a> <a href="https://github.com/InfluxCommunity/influxdb3-csharp/actions/workflows/linter.yml"> <img src="https://github.com/InfluxCommunity/influxdb3-csharp/actions/workflows/linter.yml/badge.svg" alt="Lint Code Base"> </a> <a href="https://dl.circleci.com/status-badge/redirect/gh/InfluxCommunity/influxdb3-csharp/tree/main"> <img src="https://dl.circleci.com/status-badge/img/gh/InfluxCommunity/influxdb3-csharp/tree/main.svg?style=svg" alt="CircleCI"> </a> <a href="https://codecov.io/gh/InfluxCommunity/influxdb3-csharp"> <img src="https://codecov.io/gh/InfluxCommunity/influxdb3-csharp/branch/main/graph/badge.svg" alt="Code Cov"/> </a> <a href="https://app.slack.com/huddle/TH8RGQX5Z/C02UDUPLQKA"> <img src="https://img.shields.io/badge/slack-join_chat-white.svg?logo=slack&style=social" alt="Community Slack"> </a> </p>

InfluxDB 3 C# .NET Client

The C# .NET client that provides an easy and convenient way to interact with InfluxDB 3. This package supports both writing data to InfluxDB and querying data using the FlightSQL client, which allows you to execute SQL queries against InfluxDB IOx.

We offer this Getting Started: InfluxDB 3.0 C# Client Library video to learn more about the library.

Installation

Add the latest version of the client to your project:

dotnet add package InfluxDB3.Client

Usage

To start with the client, import the InfluxDB3.Client package and create a InfluxDBClient by constructor initializer:

using System.Threading.Tasks;
using InfluxDB3.Client;
using InfluxDB3.Client.Write;

namespace InfluxDB3.Examples.IOx;

public class IOxExample
{
 static async Task Main(string[] args)
 {
 const string host = "https://us-east-1-1.aws.cloud2.influxdata.com";
 const string token = "my-token";
 const string database = "my-database";

 using var client = new InfluxDBClient(host, token: token, database: database);
 }
}

Write

To write data, you can use code like this:

//
// Write by Point
//
var point = PointData.Measurement("temperature")
 .SetTag("location", "west")
 .SetField("value", 55.15)
 .SetTimestamp(DateTime.UtcNow.AddSeconds(-10));
await client.WritePointAsync(point: point);

//
// Optional: define preferred tag order for line protocol serialization
// (useful for first write to control physical column order in InfluxDB 3 Enterprise)
//
using var orderedClient = new InfluxDBClient(new ClientConfig
{
 Host = host,
 Token = token,
 Database = database,
 WriteOptions = new WriteOptions
 {
 TagOrder = new[] { "region", "host" }
 }
});

await orderedClient.WritePointAsync(point: point);

//
// Write by LineProtocol
//
const string record = "temperature,location=north value=60.0";
await client.WriteRecordAsync(record: record);
Partial Writes

Use WriteOptions.AcceptPartial to control whether a V3 write can partially succeed when some lines fail. Default is true (server default). When false, the full batch is rejected.

using var client = new InfluxDBClient(new ClientConfig
{
 Host = host,
 Token = token,
 Database = database,
 WriteOptions = new WriteOptions
 {
 UseV2Api = false
 }
});

var lp =
 "home,room=Sunroom temp=96 1735545600\n" +
 "home,room=Sunroom temp=\"hi\" 1735549200";

try
{
 await client.WriteRecordAsync(lp);
}
catch (InfluxDBPartialWriteException e)
{
 foreach (var lineErr in e.LineErrors)
 {
 Console.WriteLine(
 $"line {lineErr.LineNumber} failed: {lineErr.ErrorMessage} ({lineErr.OriginalLine})");
 }
}
catch (InfluxDBApiException e)
{
 Console.WriteLine(e.Message);
}

See Partial writes for more.

Compatibility with InfluxDB Clustered and InfluxDB Cloud Dedicated/Serverless

Writes use the V2 API endpoint by default, so no additional configuration is required for these products.

UseV2Api can be configured in three ways:

  1. WriteOptions.UseV2Api
  2. Connection string writeUseV2Api
  3. Environment variable INFLUX_WRITE_USE_V2_API

AcceptPartial can be configured in three ways:

  1. WriteOptions.AcceptPartial
  2. Connection string writeAcceptPartial
  3. Environment variable INFLUX_WRITE_ACCEPT_PARTIAL

NoSync requires the V3 API endpoint, which is available with InfluxDB 3 Core/Enterprise. AcceptPartial applies only when writes are sent to the V3 API endpoint and is ignored when using the V2 API endpoint. To use NoSync, set UseV2Api=false (or equivalent via connection string/env var). Note: when writes use the V2 API endpoint, NoSync=true returns a validation error.

Query

To query your data, you can use code like this:

//
// Query by SQL
//
const string sql = "select time,location,value from temperature order by time desc limit 10";
Console.WriteLine("{0,-30}{1,-15}{2,-15}", "time", "location", "value");
await foreach (var row in client.Query(query: sql))
{
 Console.WriteLine("{0,-30}{1,-15}{2,-15}", row[0], row[1], row[2]);
}
Console.WriteLine();

//
// Query by parametrized SQL
//
const string sqlParams = "select time,location,value from temperature where location=$location order by time desc limit 10";
Console.WriteLine("Query by parametrized SQL");
Console.WriteLine("{0,-30}{1,-15}{2,-15}", "time", "location", "value");
await foreach (var row in client.Query(query: sqlParams, namedParameters: new Dictionary<string, object> { { "location", "west" } }))
{
 Console.WriteLine("{0,-30}{1,-15}{2,-15}", row[0], row[1], row[2]);
}
Console.WriteLine();

//
// Query by InfluxQL
//
const string influxQL =
 "select MEAN(value) from temperature group by time(1d) fill(none) order by time desc limit 10";
Console.WriteLine("{0,-30}{1,-15}", "time", "mean");
await foreach (var row in client.Query(query: influxQL, queryType: QueryType.InfluxQL))
{
 Console.WriteLine("{0,-30}{1,-15}", row[1], row[2]);
}

gRPC Compression

The client uses gRPC for querying data from InfluxDB 3.

Request Compression

Request compression is not supported by InfluxDB 3 — the client sends uncompressed requests.

Response Compression

By default, the client advertises support for gzip compression and the server may compress responses. The client handles decompression automatically.

To disable response compression, set DisableGrpcCompression to true:

using var client = new InfluxDBClient(new ClientConfig
{
 Host = "https://us-east-1-1.aws.cloud2.influxdata.com",
 Token = "my-token",
 Database = "my-database",
 QueryOptions = new QueryOptions
 {
 DisableGrpcCompression = true
 }
});

Alternatively, use the INFLUX_DISABLE_GRPC_COMPRESSION environment variable:

export INFLUX_DISABLE_GRPC_COMPRESSION=true

Or use the connection string parameter:

using var client = new InfluxDBClient("https://us-east-1-1.aws.cloud2.influxdata.com?token=my-token&database=my-database&disableGrpcCompression=true");

Feedback

If you need help, please use our Community Slack or Community Page.

New features and bugs can be reported on GitHub: https://github.com/InfluxCommunity/influxdb3-csharp

Contribution

If you would like to contribute code you can do through GitHub by forking the repository and sending a pull request into the main branch.

License

The InfluxDB 3 C# .NET Client is released under the MIT License.

Product Versions Compatible and additional computed target framework versions.
.NET net5.0 net5.0 was computed.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 was computed.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 was computed.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
.NET Core netcoreapp2.0 netcoreapp2.0 was computed.  netcoreapp2.1 netcoreapp2.1 was computed.  netcoreapp2.2 netcoreapp2.2 was computed.  netcoreapp3.0 netcoreapp3.0 was computed.  netcoreapp3.1 netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 netstandard2.0 is compatible.  netstandard2.1 netstandard2.1 is compatible. 
.NET Framework net461 net461 was computed.  net462 net462 was computed.  net463 net463 was computed.  net47 net47 was computed.  net471 net471 was computed.  net472 net472 was computed.  net48 net48 was computed.  net481 net481 was computed. 
MonoAndroid monoandroid monoandroid was computed. 
MonoMac monomac monomac was computed. 
MonoTouch monotouch monotouch was computed. 
Tizen tizen40 tizen40 was computed.  tizen60 tizen60 was computed. 
Xamarin.iOS xamarinios xamarinios was computed. 
Xamarin.Mac xamarinmac xamarinmac was computed. 
Xamarin.TVOS xamarintvos xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on InfluxDB3.Client:

Package Downloads
Dijing.InfluxdbExt

influxdb2.0 extension tool

Zongsoft.Data.Influx

This is a data driver for InfluxDB of the Zongsoft data engine.

VL.IO.InfluxDB

VL Wrapper for the InfluxDB 3 C# .NET Client

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.9.0 309 6/11/2026
1.9.0-dev.4942 155 5/19/2026
1.9.0-dev.4892 63 5/18/2026
1.9.0-dev.4751 60 5/12/2026
1.9.0-dev.4729 67 5/11/2026
1.9.0-dev.4679 55 5/6/2026
1.9.0-dev.4657 58 5/6/2026
1.9.0-dev.4648 49 5/6/2026
1.9.0-dev.4620 50 5/5/2026
1.9.0-dev.4591 58 5/4/2026
1.9.0-dev.4527 59 5/1/2026
1.9.0-dev.4484 62 4/29/2026
1.9.0-dev.4448 65 4/27/2026
1.9.0-dev.4404 59 4/23/2026
1.9.0-dev.4390 61 4/23/2026
1.8.0 5,570 4/23/2026
1.8.0-dev.4375 62 4/22/2026
1.8.0-dev.4346 59 4/21/2026
1.8.0-dev.4324 59 4/20/2026
1.8.0-dev.4316 58 4/20/2026
Loading failed