Skip to main content

Chroma Client.

Project description

Chroma logo

Chroma - the open-source embedding database.
This package is for the the Python HTTP client-only library for Chroma. This client connects to the Chroma Server. If that it not what you are looking for, you might want to check out the full library.

pip install chromadb-client # python http-client only library

To connect to your server and perform operations using the client only library, you can do the following:

import chromadb
# Example setup of the client to connect to your chroma server
client = chromadb.HttpClient(host="localhost", port=8000)

collection = client.create_collection("all-my-documents")

collection.add(
    documents=["This is document1", "This is document2"],
    metadatas=[{"source": "notion"}, {"source": "google-docs"}], # filter on these!
    ids=["doc1", "doc2"], # unique for each doc
    embeddings = [[1.2, 2.1, ...], [1.2, 2.1, ...]]
)

results = collection.query(
    query_texts=["This is a query document"],
    n_results=2,
    # where={"metadata_field": "is_equal_to_this"}, # optional filter
    # where_document={"$contains":"search_string"}  # optional filter
)

License

Apache 2.0

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

chromadb_client-0.5.18.tar.gz (33.6 MB view details)

Uploaded Source

Built Distribution

chromadb_client-0.5.18-py3-none-any.whl (613.5 kB view details)

Uploaded Python 3

File details

Details for the file chromadb_client-0.5.18.tar.gz.

File metadata

  • Download URL: chromadb_client-0.5.18.tar.gz
  • Upload date:
  • Size: 33.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for chromadb_client-0.5.18.tar.gz
Algorithm Hash digest
SHA256 cf96f4c916eb8f3a96efd31a5c361a4fb4e356debb4481da922813a4063e9ff4
MD5 27a4bcc0db0b9c16395eec3b9c5c7db7
BLAKE2b-256 a54c4d3cf87e2c38ce0f8184b290aebb6fee8bfe12c4576793c1b5a285c75dcc

See more details on using hashes here.

File details

Details for the file chromadb_client-0.5.18-py3-none-any.whl.

File metadata

File hashes

Hashes for chromadb_client-0.5.18-py3-none-any.whl
Algorithm Hash digest
SHA256 271ec295f39d45a6f09aa4c986a2ef31f5d6a9ce1e79b727f8f3a1d7e4592e8c
MD5 1266d45a2c7ddea748f792be6b7c77cf
BLAKE2b-256 56ff91a6c19f3cc3fe56eedfc08d328b6143a219efce9952acafded125419ec4

See more details on using hashes here.

Supported by

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