ChromaDotNet.Testcontainers 0.1.3

Prefix Reserved
dotnet add package ChromaDotNet.Testcontainers --version 0.1.3
                    
NuGet\Install-Package ChromaDotNet.Testcontainers -Version 0.1.3
                    
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="ChromaDotNet.Testcontainers" Version="0.1.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ChromaDotNet.Testcontainers" Version="0.1.3" />
                    
Directory.Packages.props
<PackageReference Include="ChromaDotNet.Testcontainers" />
                    
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 ChromaDotNet.Testcontainers --version 0.1.3
                    
#r "nuget: ChromaDotNet.Testcontainers, 0.1.3"
                    
#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 ChromaDotNet.Testcontainers@0.1.3
                    
#: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=ChromaDotNet.Testcontainers&version=0.1.3
                    
Install as a Cake Addin
#tool nuget:?package=ChromaDotNet.Testcontainers&version=0.1.3
                    
Install as a Cake Tool

ChromaDB.Testcontainers

A Testcontainers for .NET module for Chroma, published as the ChromaDotNet.Testcontainers package: start a throwaway Chroma container in your tests.

This is a community project. It is not affiliated with or endorsed by Testcontainers or Chroma.

Usage

dotnet add package ChromaDotNet.Testcontainers
using Testcontainers.Chroma;

await using var chroma = new ChromaBuilder("chromadb/chroma:1.5.9").Build();
await chroma.StartAsync();

// The base address of the Chroma API, like http://localhost:32768/
var address = chroma.GetConnectionString();

GetBaseAddress() returns the same address; ChromaBuilder.ChromaHttpPort is the port of the API in the container, 8000.

With ChromaDotNet.Client:

using ChromaDB.Client;

using var httpClient = new HttpClient();
var options = new ChromaConfigurationOptions(chroma.GetConnectionString());
var client = new ChromaClient(options, httpClient);

var collection = await client.CreateCollectionAsync("documents");

The container is ready when the heartbeat of the Chroma API answers: the v2 API from Chroma 0.5.16, and the v1 API on the earlier releases, so the module works with any Chroma image, whatever its tag.

Building and testing

dotnet build ChromaDB.Testcontainers.slnx
dotnet test tests/Testcontainers.Chroma.Tests
CHROMA_IMAGE=chromadb/chroma:0.4.10 dotnet test tests/Testcontainers.Chroma.ImageTests

The tests start Chroma in containers, so they need Docker. tests/Testcontainers.Chroma.ImageTests runs on the image in CHROMA_IMAGE, which the CI sets to each Chroma release it tests.

Origin

The module follows the structure and conventions of the modules of Testcontainers for .NET, so that it can become one of them: the code and the tests started as a copy of its Qdrant module, under the MIT license, and docs/modules/chroma.md is the page proposed for its documentation site: it names the package Testcontainers.Chroma that Testcontainers for .NET would publish, and its --8<-- lines include the code when that site is built. Here the package is ChromaDotNet.Testcontainers.

It is proposed to Testcontainers for .NET in testcontainers/testcontainers-dotnet#1784. This repository publishes it until Testcontainers for .NET ships Testcontainers.Chroma; then it will be archived and the package deprecated in its favor. The namespace and the API are the same, so moving there changes only the package reference.

Every change to the module is made first in that pull request; eng/sync-from-upstream.sh copies src/Testcontainers.Chroma, tests/Testcontainers.Chroma.Tests and docs/modules/chroma.md here. The rest, like the build files, the CI and tests/Testcontainers.Chroma.ImageTests, belongs to this repository.

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

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.3 0 10/5/2026
0.1.2 0 10/5/2026
0.1.1 0 10/5/2026
0.1.0 552 10/4/2026