All Projects → cognitedata → cognite-sdk-dotnet

cognitedata / cognite-sdk-dotnet

Licence: Apache-2.0 License
.NET SDK for Cognite Data Fusion (CDF)

Programming Languages

C#
18002 projects
F#
602 projects
shell
77523 projects

Projects that are alternatives of or similar to cognite-sdk-dotnet

Efcore
EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.
Stars: ✭ 10,838 (+77314.29%)
Mutual labels:  dotnet-standard, dotnet-framework
Sharpsnmplib
Sharp SNMP Library- Open Source SNMP for .NET and Mono
Stars: ✭ 247 (+1664.29%)
Mutual labels:  dotnet-standard, dotnet-framework
Entityframeworkcore.cacheable
EntityFrameworkCore second level cache
Stars: ✭ 138 (+885.71%)
Mutual labels:  dotnet-standard, dotnet-framework
Minion
Background job system for .NET applications
Stars: ✭ 94 (+571.43%)
Mutual labels:  dotnet-standard, dotnet-framework
Capstone.NET
.NET Core and .NET Framework binding for the Capstone Disassembly Framework
Stars: ✭ 108 (+671.43%)
Mutual labels:  dotnet-standard, dotnet-framework
Theraot
Backporting .NET and more: LINQ expressions in .net 2.0 - nuget Theraot.Core available.
Stars: ✭ 112 (+700%)
Mutual labels:  dotnet-standard, dotnet-framework
Dotnet Etcd
A C# .NET (dotnet) GRPC client for etcd v3 +
Stars: ✭ 157 (+1021.43%)
Mutual labels:  dotnet-standard, dotnet-framework
Mockqueryable
Moking Entity Framework Core operations such ToListAsync, FirstOrDefaultAsync etc
Stars: ✭ 281 (+1907.14%)
Mutual labels:  dotnet-standard, dotnet-framework
B2.NET
.NET library for Backblaze's B2 Cloud Storage
Stars: ✭ 63 (+350%)
Mutual labels:  dotnet-standard, dotnet-framework
toolbox
dein ToolBox - C# .Net Library with utilities like: command line, files, log, platform, shell, system, transform and validation [ Win+Mac+Linux ]
Stars: ✭ 46 (+228.57%)
Mutual labels:  dotnet-standard, dotnet-framework
Tweetinvi
Tweetinvi, an intuitive Twitter C# library for the REST and Stream API. It supports .NET, .NETCore, UAP (Xamarin)...
Stars: ✭ 812 (+5700%)
Mutual labels:  dotnet-standard, dotnet-framework
colorify
Colorify - C# .Net Console Library with Text Format: colors, alignment and lot more [ Win+Mac+Linux ]
Stars: ✭ 49 (+250%)
Mutual labels:  dotnet-standard, dotnet-framework
Linqtotwitter
LINQ Provider for the Twitter API (C# Twitter Library)
Stars: ✭ 401 (+2764.29%)
Mutual labels:  dotnet-standard, dotnet-framework
dapr-sidekick-dotnet
Dapr Sidekick for .NET - a lightweight lifetime management component for Dapr
Stars: ✭ 113 (+707.14%)
Mutual labels:  dotnet-standard, dotnet-framework
Csconsoleformat
.NET C# library for advanced formatting of console output [Apache]
Stars: ✭ 296 (+2014.29%)
Mutual labels:  dotnet-standard, dotnet-framework
Appmetrics
App Metrics is an open-source and cross-platform .NET library used to record and report metrics within an application.
Stars: ✭ 1,986 (+14085.71%)
Mutual labels:  dotnet-standard, dotnet-framework
Dot-Net-Ecosystem
Welcome to the GitHub repository of the .NET Ecosystem. This repository contains the examples for the Pluralsight course: The .NET Ecosystem: The Big Picture. You can download a copy and follow along in the course.
Stars: ✭ 34 (+142.86%)
Mutual labels:  dotnet-standard, dotnet-framework
NeoClient
🦉 Lightweight OGM for Neo4j which support transactions and BOLT protocol.
Stars: ✭ 21 (+50%)
Mutual labels:  dotnet-standard, dotnet-framework
King.Service
Task scheduling for .NET
Stars: ✭ 34 (+142.86%)
Mutual labels:  dotnet-standard, dotnet-framework
WebDavClient
Asynchronous cross-platform WebDAV client for .NET Core
Stars: ✭ 98 (+600%)
Mutual labels:  dotnet-standard
Cognite logo

CogniteSdk for .Net

Build and Test codecov Nuget

Under development, not recommended for production use cases

CogniteSdk for .NET is a cross platform asynchronous SDK for accessing the Cognite Data Fusion API (v1) using .NET Standard 2.0 that works for all .NET implementations i.e both .NET Core and .NET Framework.

The SDK may be used from both C# and F#.

  • C# SDK: The C# SDK is a fluent API using objects and method chaining. Errors will be raised as exceptions. The API is asynchronous and all API methods returns Task and is awaitable using async/await.

  • F# SDK: The F# API is written using plain asynchronous functions returning Task built on top of the Oryx HTTP handler library.

Supported Resources

Documentation

Installation

CogniteSdk is available as a NuGet package. To install:

Using Package Manager:

Install-Package CogniteSdk

Using .NET CLI:

dotnet add package CogniteSdk

Or directly in Visual Studio.

Quickstart

The SDK supports authentication through api-keys. The best way to use the SDK is by setting authentication values to environment values:

Using Windows Commands:

setx PROJECT=myprojet
setx API_KEY=mysecretkey

Using Shell:

export PROJECT=myprojet
export API_KEY=mysecretkey

All SDK methods are called with a Client object. A valid client requires:

  • API Key - key used for authentication with CDF.
  • Project Name - the name of your CDF project e.g publicdata.
  • App ID - an identifier for your application. It is a free text string. Example: asset-hierarchy-extractor
  • HTTP Client - The HttpClient that will be used for the remote connection. Having this separate from the SDK have many benefits like using e.g Polly for policy handling.
using CogniteSdk;

var apiKey = Environment.GetEnvironmentVariable("API_KEY");
var project = Environment.GetEnvironmentVariable("PROJECT");

using var httpClient = new HttpClient(handler);
var builder = new Client.Builder();
var client =
    builder
        .SetAppId("playground")
        .SetHttpClient(httpClient)
        .SetApiKey(apiKey)
        .SetProject(project)
        .Build();

// your logic using the client
var query = new Assets.AssetQuery
{
    Filter = new Assets.AssetFilter { Name = assetName }
};
var result = await client.Assets.ListAsync(query);

Examples

There are examples for both C# and F# in the Playground folder. To play with the example code, you need to set the CDF project and API key as environment variables.

Dependencies

Dependencies for all projects are handled using Paket. To install dependencies:

> dotnet new tool-manifest
> dotnet tool install Paket
> dotnet paket install

This will install the main dependencies and sub-dependencies. The main dependencies are:

Running tests locally

sh ./test.sh

For this script AAD env variables need to be defined: TEST_TENANT_ID_WRITE, TEST_CLIENT_ID_WRITE, TEST_CLIENT_SECRET_WRITE.

Code of Conduct

This project follows https://www.contributor-covenant.org, see our Code of Conduct.

License

Apache v2, see LICENSE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].