chloedb: ChloeDB from Python
import chloedb runs a ChloeDB database in your process (chloedb.open,
chloedb.Database), the way sqlite3 runs SQLite, or talks to a running
chloedb-server (chloedb.connect, chloedb.Client), with the same
methods: insert, upsert, delete, import_file, query, sql,
search, and table() for queries built from Python values instead of SQL
text. A database in your process also answers with Arrow columns
(query_arrow), which pyarrow, polars and pandas read without copying them.
pip install chloedb # prebuilt for CPython 3.10+, on macOS 11+ and Linux with glibc 2.28+; no Rust needed
pip install "chloedb[server]" # the same, and chloedb-server of the same release (from 0.3.7)
pip install ./chloedb-py # or from source, from the repository's root; needs Rust
A first search
import chloedb
db = chloedb.open("books.chloedb", schema={
"table": "books", "key": "id",
"fields": [
{"name": "id", "type": "keyword"},
{"name": "title", "type": "text"},
{"name": "year", "type": "int"},
],
})
db.upsert([
{"id": "b1", "title": "The river and the dragon", "year": 1999},
{"id": "b2", "title": "Winter garden", "year": 2005},
{"id": "b3", "title": "Dragons of the northern rivers", "year": 2011},
])
# Words, ranked by BM25, with a filter
for row in db.query("SELECT id, title FROM books WHERE MATCH(title, :q) AND year > :y "
"ORDER BY bm25(title, :q) DESC", q="dragon", y=2000):
print(row["id"], row["title"])
# A typo, forgiven
for row in db.query("SELECT id, title FROM books ORDER BY bm25(title, :q, fuzzy => 'auto') DESC LIMIT 2", q="dragn"):
print(row["id"], row["title"])
db.close()
b3 Dragons of the northern rivers
b1 The river and the dragon
b3 Dragons of the northern rivers
chloedb.open(path, schema) creates the database the first time and opens
it after. upsert replaces whole rows by their keys; to change one field,
use db.sql("UPDATE books SET year = 2000 WHERE id = 'b1'").
- More like this:
{"vector_of": key}is a stored row's vector, soORDER BY similarity(emb, :v)withv={"vector_of": "b1"}ranks the rows nearest that row in meaning (on a table with a vector field, such as one embedded bypotion-retrieval-32M). - A server:
chloedb.serve()starts achloedb-serveron this machine (from theserverextra) and returns a client of it, which stops it when closed;chloedb.connect("http://127.0.0.1:7700")is a client of one already running. Both have the methods above. A web app whose processes all write (a reloader, several workers) uses a server, since one process at a time may open a file to write it.
Frames are lazy dataframes over tables, run where the data is (a build
from source, with pyarrow: pip install "./chloedb-py[frame]"; release 0.1.0
has no frames):
import chloedb
from chloedb import col
shop = chloedb.connect("shop.chloedb") # a file, or a server: chloedb.connect("https://...")
(shop["orders"].filter(col("status") == "paid")
.group_by("country").agg(revenue=col("amount").sum(), n=chloedb.len())
.sort("revenue", descending=True).to_polars())
LangChain, LangGraph and LlamaIndex take ChloeDB as their vector store,
checkpointer and memory store (chloedb.langchain, chloedb.langgraph,
chloedb.llama_index, with the extras [langchain], [langgraph] and
[llama-index]), and chloedb.dbapi is a DB-API 2.0 driver, for
pandas.read_sql and other tools: see
the frameworks page.
import strata, ChloeDB's old name, imports the same package for a release,
with a DeprecationWarning; release 0.1.0, from before the rename, was
published as strata-db and imports as strata only.
When something fails
BusyError: busy: the database is open elsewhere: the file is open to write already, in another process (Flask's debug reloader, a second worker, a chloedb-server) or by an earlieropenin this one, and the message goes on to say which, and what to do. Share onedbin a process, open it withread_only=Truein the others, or serve it withchloedb-serverandchloedb.connectto it.urllib.error.URLError: <urlopen error [Errno 111] Connection refused>: no server answers at the client's URL. It is anOSError, not achloedb.ChloeDBError.BadRequestError: schema error: row 1: schema error: bad value for minutes: "five": a value of the wrong type for its field; convert form input before writing.
The rest, with what to do, are in the Python page's common errors and troubleshooting.
Docs and tests
The guide is the Python page
(docs/chloedb/python.md
in the repository), with the search guide
and Build a search page
for searches, and DataFrames
for frames. Tests: maturin develop --release && pytest tests in a
virtualenv (the client tests use ../chloedb-server/target/release/chloedb-server,
or $CHLOEDB_SERVER, and are skipped without it; the Kafka consumer's test
needs a broker at $CHLOEDB_KAFKA, such as Redpanda in Docker, and
confluent-kafka; the Arrow tests need pyarrow, and polars and pandas
for theirs).
Metadata
Release files for chloedb 0.3.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| chloedb-0.3.8-cp310-abi3-manylinux_2_28_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.28+ x86-64 | Details for chloedb-0.3.8-cp310-abi3-manylinux_2_28_x86_64.whl |
| chloedb-0.3.8-cp310-abi3-manylinux_2_28_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.28+ ARM64 | Details for chloedb-0.3.8-cp310-abi3-manylinux_2_28_aarch64.whl |
| chloedb-0.3.8-cp310-abi3-macosx_11_0_x86_64.whl | CPython 3.10 | abi3 | macOS 11.0+ x86-64 | Details for chloedb-0.3.8-cp310-abi3-macosx_11_0_x86_64.whl |
| chloedb-0.3.8-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details for chloedb-0.3.8-cp310-abi3-macosx_11_0_arm64.whl |
Total release size: 133.6 MB
Release files / chloedb-0.3.8-cp310-abi3-manylinux_2_28_x86_64.whl
| Download URL | chloedb-0.3.8-cp310-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 34.7 MB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
08c02989417de37f814c2e3f0d584b8c0f6ca131ec0fa76b236a6757ad003048
|
|
BLAKE2b-256 checksum How to use checksums |
97de0640f054dec44d654a13a6c10dea71083e653c982a01b212471020515944
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logRelease files / chloedb-0.3.8-cp310-abi3-manylinux_2_28_aarch64.whl
| Download URL | chloedb-0.3.8-cp310-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 33.6 MB |
| Tags | CPython 3.10 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
4f8baaeecc37c780eed8098758467f7cb03b2ff9fb03795b9bcc6c179ab0ece8
|
|
BLAKE2b-256 checksum How to use checksums |
87f7bb88be83a0f926ebf80ab4ee1e0562295199bf4993d0c6230a4b8a9610dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logRelease files / chloedb-0.3.8-cp310-abi3-macosx_11_0_x86_64.whl
| Download URL | chloedb-0.3.8-cp310-abi3-macosx_11_0_x86_64.whl |
|---|---|
| Size | 33.7 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
f42bdf08d486fa827f5fc221549917eb95a9fcd359d132eef0cbd4652b7302ff
|
|
BLAKE2b-256 checksum How to use checksums |
871131078b5e1fc044d8e24c933ce45c65c1c4a59f29d0368a40f465c2cb7bf1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logRelease files / chloedb-0.3.8-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | chloedb-0.3.8-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 31.6 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
188da39b97fdde3eb1265ebe2893fd27c8c6818232cf4a576987523810084ada
|
|
BLAKE2b-256 checksum How to use checksums |
a8242e26d141d50748aa14a4edf7de0add933389a9ab71506aa3279f895d5bfd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logSecurity for chloedb 0.3.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 4 files in this release have been uploaded with provenance metadata.
Attestation for chloedb-0.3.8-cp310-abi3-manylinux_2_28_x86_64.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.