Skip to main content

Chroma import/export tool.

Project description

chromie-tool

Chroma (https://trychroma.com) import/export tool.

Install

# install
pip install chromie-tool

# check chromie tool
which chromie

Commands

Help

# chromie
chromie -h

# exp command
chromie exp -h

Export

chromie exp server://localhost:8000/tenant/db/collection file.json

Import

chromie imp file.json server://localhost:8000/tenant/db/collection

Listing the database collections

# only names
chromie ls server:////

# names and counts
chromie ls -c server:////

URIs

Server URI

Format:

server://host:port/tenant/database
server://host:port/tenant/database/collection

When a segment must take its value from the default value or an environment variable, this must be left blank. Examples:

server://///
server:///tenant/db

Environment variables we can use for settings segments in server URIs:

  • CHROMA_HOST

  • CHROMA_PORT

  • CHROMA_TENANT

  • CHROMA_DATABASE

The default values in server URIs, when blank segments and environment variable unset, are these set in the chromadb package. Right now:

  • Host: localhost

  • Port: 8000

  • Tenant: default_tenant

  • Database: default_database

Chroma Cloud URI

Format:

cloud:///tenant/db
cloud:///tenant/db/collection

Similar to the server schema but, with the cloud schema, the environment variables we can use are the following:

  • CHROMA_TENANT

  • CHROMA_DATABASE

Default values:

  • host:port segment is always api.trychroma.com:8000.

  • Tenant and database don't have default values, these must be set explicitly or with environment variables.

Checking and decomposing URIs

With chromie uri, we check and decompose a URI. Examples:

$ chromie uri server:////
Schema: server
Host: localhost
Port: 8000
Tenant: default_tenant
Database: default_database

$ CHROMA_PORT=8888 chromie uri server:////
Schema: server
Host: localhost
Port: 8888
Tenant: default_tenant
Database: default_database

$ CHROMA_DATABASE=testdb chromie uri server://me//
Schema: server
Host: me
Port: 8000
Tenant: default_tenant
Database: testdb

Pinging database instance and/or collection

Examples:

# database instance
chromie ping server:////

# database collection
chromie ping server://///movies
chromie ping cloud://///movies

API key

When API key needed, --key or -k must be set. We can use the CHROMA_API_KEY environment variable too.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chromie_tool-0.2.0.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chromie_tool-0.2.0-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file chromie_tool-0.2.0.tar.gz.

File metadata

  • Download URL: chromie_tool-0.2.0.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for chromie_tool-0.2.0.tar.gz
Algorithm Hash digest
SHA256 55a8d518b532ec1189e849176d85c8ebece9233cb67cf7900d6cd50e7a192851
MD5 c4307cd18fdfddf76073203a907db2bd
BLAKE2b-256 9501fafc33e667af0ad91b8a7f9e077c1398e7b12fc13497a0898ddbbf915c2f

See more details on using hashes here.

Provenance

The following attestation bundles were made for chromie_tool-0.2.0.tar.gz:

Publisher: publish.yaml on chromiodev/chromie-tool

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chromie_tool-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: chromie_tool-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 19.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for chromie_tool-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d31dbf0a04f6cf3a6cf04bbe4804b0365a4cfb34fd25b118c99d6528612aa320
MD5 1559b7152b39c86e7c51df1aa5ad7ff9
BLAKE2b-256 7791e6a1c335e7eef294a42a64a3e34b4c7c8223936f1870601a5241f1f9879c

See more details on using hashes here.

Provenance

The following attestation bundles were made for chromie_tool-0.2.0-py3-none-any.whl:

Publisher: publish.yaml on chromiodev/chromie-tool

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page