Skip to main content

ApexBase



PyPI Python License

ApexBase is a high-performance embedded HTAP database with a Rust core and a Python-first API.

Install it, choose persistent .apex files or a true process-local in-memory database, run analytical SQL, import/export DataFrames, and optionally expose persistent data through PostgreSQL Wire or Arrow Flight. No separate database service is required.

Why ApexBase

What you need What ApexBase gives you
Fast local analytics Columnar storage, shared scan/selection operators, vectorized execution, SQL aggregations, joins, CTEs, windows, and indexes
Low-friction Python workflows ApexClient, apexbase.execute, Pandas / Polars / PyArrow conversion, file table functions, and local or in-memory storage
One engine for mixed workloads HTAP design: fast writes, point lookups, analytical scans, transactions, and MVCC
Search built in Full-text search, vector TopK, Float16/BFloat16/Int8/UInt8/1Bit/TurboQuant storage, and exact reranking from a retained source vector
Tool compatibility PostgreSQL Wire for database clients and Arrow Flight for fast columnar transfer

Install

pip install apexbase

Build from source:

python -m pip install maturin
maturin develop --release

30-Second Example: FTS + SQL + Vector Search In One Local File

from apexbase import ApexClient

with ApexClient("./rag-data") as client:
    client.execute("""
        CREATE TABLE articles (
            title TEXT,
            body TEXT,
            category TEXT,
            views INT,
            embedding FLOAT16_VECTOR
        )
    """)
    client.use_table("articles")

    client.store([
        {
            "title": "Rust-powered local analytics",
            "body": "A columnar embedded database for fast SQL and search.",
            "category": "database",
            "views": 4200,
            "embedding": [0.10, 0.82, 0.20],
        },
        {
            "title": "Hybrid retrieval for RAG",
            "body": "Combine full-text recall, SQL filters, and semantic vector ranking.",
            "category": "ai",
            "views": 6100,
            "embedding": [0.16, 0.74, 0.58],
        },
        {
            "title": "SQLite migration notes",
            "body": "Move local applications to an analytical embedded store.",
            "category": "database",
            "views": 2600,
            "embedding": [0.80, 0.12, 0.10],
        },
    ])

    client.execute("CREATE FTS INDEX ON articles(title, body)")

    # FTS recall + structured SQL guardrails + pgvector-style semantic rerank.
    df = client.execute("""
        SELECT
            title,
            category,
            views,
            cosine_distance(embedding, [0.12, 0.78, 0.25]) AS semantic_dist
        FROM articles
        WHERE MATCH('database')
          AND category = 'database'
          AND views > 3000
        ORDER BY semantic_dist
        LIMIT 5
    """).to_pandas()

    print(df)

ApexBase gives you pgvector-style semantic search, SQL filters, and full-text search in the same embedded database file. It is the kind of stack you would otherwise assemble from SQLite/DuckDB + FTS + pgvector, but without a server process or a separate search/vector service; results still convert directly to Pandas, Polars, or Arrow.

For scratch work, tests, and short-lived analytics, use the same API without creating database, catalog, WAL, delta, or index files:

from apexbase import ApexClient

with ApexClient(":memory:") as client:
    client.execute("CREATE TABLE metrics (name TEXT, value DOUBLE)")
    client.execute("INSERT INTO metrics VALUES ('latency_ms', 2.4)")
    print(client.execute("SELECT AVG(value) AS average FROM metrics").scalar())

For the smallest SQL-only scripts, apexbase.execute(...) uses one lazily created process-local in-memory connection shared by later module-level calls; create a table before running table-scoped queries.

Performance At A Glance

The latest retained complete public snapshot uses 1,000,000 tabular rows and 1,000,000 vectors x 128 dimensions on Apple arm64 with Python 3.12.

Area Snapshot
Public coverage 103 tabular metrics, 6 exact-vector metrics, and 8 ApexBase quantized-vector precision rows
Comparable results ApexBase wins 115 / 115 rows with a direct competitor in the retained complete snapshot
Exact vector search All 6 single/batch Float32 TopK rows beat the compared engines and match brute-force exact top-k row sets
Reproducibility Fixed data sizes, 2 warmups, 5 timed iterations, dependency metadata, and a retained JSON report

Benchmarks are workload-sensitive. The default benchmark command tracks this public scoreboard; extended diagnostics live in benchmarks/bench_vs_sqlite_duckdb_extended.py. See the full reproducible setup in the Performance documentation.

Starting with 1.33, filtered grouped queries can use a shared physical scan protocol across persisted base data and delta/overlay state. The protocol keeps predicate selection, grouping, HAVING, and ordered TopK as composable operators with a generic fallback for unsupported or inexact predicate forms. v1.34.0 adds a serial row-group pipeline, bounded parallel scan/fold execution, streaming overlay reads, and a per-query aggregation memory budget on top of it. See Scan & Physical Execution and Resource Ownership.

v1.37.0–v1.39.0 are the V5 architecture preview releases. Files may declare format version 5 (including when the schema carries parameterised types such as uuid or decimal(p,s)), and carry V5-only column encodings, _id ranges are reserved against a shared on-disk high-water mark so several processes can write one table, and new read lanes cover direct point reads, executor index lookups, full-text row-selection pushdown, and distance TopK. v1.38.0 keeps the same format and fixes the SELECT t.* … JOIN projection failure, the SQL point-lookup latency gap and the read degradation a predicate UPDATE used to leave behind. v1.39.0 keeps format version 5 and extends it with the optional logical-type section (uuid, decimal(p,s)), the matching Python/Arrow projections and an opt-in SQL DECIMAL path. V5 builds read V4 files; to keep a file readable by a pre-V5 build, set APEX_WIDTH_FIDELITY=0 to write the V4 layout. Compressed tables now store one compressed frame per column by default (so a column-selective scan does not decode the whole row group); set APEX_CHUNK_INDEX=0 to keep the flat compressed frame, which is also what a build that predates per-column frames expects. The format may still gain encodings before V5 is declared stable, so treat it as a preview and see the release notes and Storage Architecture for the compatibility rules.

Documentation

Start here: https://birchkwok.github.io/apexbase/

Goal Page
Get running quickly Installation and Quick Start
Understand the model Core Concepts
Use the Python API Python Client Guide and API Reference
Write SQL SQL Guide
Import files and DataFrames Data Import
Use database tools or Arrow clients Server Protocols
Search text or vectors Full-Text Search, Float16 Vectors, and Vector Quantization
Embed from Rust Rust Embedded API

Interfaces

# Embedded Python
python -c "from apexbase import ApexClient; print(ApexClient)"

# PostgreSQL Wire + Arrow Flight together
apexbase-serve --dir ./data

# Individual protocol servers
apexbase-server --dir ./data --port 5432
apexbase-flight --dir ./data --port 50051

Lance Interop

from apexbase import ApexClient

with ApexClient("./data") as client:
    client.use_table("articles")
    client.to_lance("./articles.lance")

with ApexClient("./imported") as client:
    client.from_lance("./articles.lance", table_name="articles")

Lance conversion uses Arrow tables as the handoff path. This keeps the in-process conversion lean and Arrow-native, while each format still writes its own on-disk layout.

License

Apache-2.0

Metadata

Release files for apexbase 1.39.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apexbase 1.39.0
File Size Uploaded Provenance Actions
apexbase-1.39.0.tar.gz 2.6 MB Without provenance Details for apexbase-1.39.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for apexbase 1.39.0
File Actions
apexbase-1.39.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for apexbase-1.39.0-cp313-cp313-win_amd64.whl
apexbase-1.39.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details for apexbase-1.39.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
apexbase-1.39.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details for apexbase-1.39.0-cp313-cp313-macosx_11_0_arm64.whl
apexbase-1.39.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for apexbase-1.39.0-cp312-cp312-win_amd64.whl
apexbase-1.39.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details for apexbase-1.39.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
apexbase-1.39.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for apexbase-1.39.0-cp312-cp312-macosx_11_0_arm64.whl
apexbase-1.39.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for apexbase-1.39.0-cp311-cp311-win_amd64.whl
apexbase-1.39.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details for apexbase-1.39.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
apexbase-1.39.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details for apexbase-1.39.0-cp311-cp311-macosx_11_0_arm64.whl
apexbase-1.39.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for apexbase-1.39.0-cp310-cp310-win_amd64.whl
apexbase-1.39.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details for apexbase-1.39.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
apexbase-1.39.0-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details for apexbase-1.39.0-cp310-cp310-macosx_11_0_arm64.whl
apexbase-1.39.0-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details for apexbase-1.39.0-cp39-cp39-win_amd64.whl
apexbase-1.39.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details for apexbase-1.39.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
apexbase-1.39.0-cp39-cp39-macosx_11_0_arm64.whl CPython 3.9 CPython 3.9 macOS 11.0+ ARM64 Details for apexbase-1.39.0-cp39-cp39-macosx_11_0_arm64.whl

Total release size: 170.2 MB

Release files / apexbase-1.39.0.tar.gz

Download URL apexbase-1.39.0.tar.gz
Size 2.6 MB
Tags Source
SHA-256 checksum
How to use checksums
1ac59d568ddcb2e3d91fd196303317332056997b98e8b6ed299b0d41e470068d
BLAKE2b-256 checksum
How to use checksums
9dfdcd975066717fcca676407894330840cdb29f7ba52b7e9fc40135583799d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / apexbase-1.39.0-cp313-cp313-win_amd64.whl

Download URL apexbase-1.39.0-cp313-cp313-win_amd64.whl
Size 11.8 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
4da2027e29528b637b0b61a263ff870879263f036e68341f28bef39f20f71b94
BLAKE2b-256 checksum
How to use checksums
d071b21b9a56fb1e4cff6b3786738567f799e50839b4918326d2d1814b09f5e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / apexbase-1.39.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL apexbase-1.39.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.5 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
ca198ee336af39e757bd489dbf179755d94f9f5bd9c5c8d294943d41894aca6a
BLAKE2b-256 checksum
How to use checksums
86221d9253142cc3c635da4fb7286e8812b5bfd198f0ea0993a24e252606ecc4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / apexbase-1.39.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL apexbase-1.39.0-cp313-cp313-macosx_11_0_arm64.whl
Size 10.2 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
9b05182c15b6815be58d84f968e58db18664f8e4108b150ffc687b806c83686a
BLAKE2b-256 checksum
How to use checksums
b01f006a297cd2f5240c027d2e1bfb742280e6c98c039a63980707d67fd269ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / apexbase-1.39.0-cp312-cp312-win_amd64.whl

Download URL apexbase-1.39.0-cp312-cp312-win_amd64.whl
Size 11.8 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
1ec5c7be3c73ff8fe8525d1921e4b0fe8e32a9989d5cc0c77534557254205e1d
BLAKE2b-256 checksum
How to use checksums
7118b39ffe39ddc452487cf708b0bddbfbf1448e2423de714e6596c45f7bc465
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / apexbase-1.39.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL apexbase-1.39.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.5 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
12ed441fdebe220c985a9a42a2bbf046f6bd4a948477dd0cc8f7a0e430adcfca
BLAKE2b-256 checksum
How to use checksums
d5991e2b4b4971e36ff6169e55647a6c5cb216321aae9856a1f6f6924e6dc875
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / apexbase-1.39.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL apexbase-1.39.0-cp312-cp312-macosx_11_0_arm64.whl
Size 10.2 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6c07d97720b17a376e94a601394e71314f2a231b7c51a1ad8898c87e462f9d79
BLAKE2b-256 checksum
How to use checksums
dc045ea0c614ca8a1c279413e22c6d91a660f731392766899739ba485746295b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / apexbase-1.39.0-cp311-cp311-win_amd64.whl

Download URL apexbase-1.39.0-cp311-cp311-win_amd64.whl
Size 11.8 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
68788c11840e7073789de389172a2dd5741d34ca3a3b0c059cee3584c7a54a98
BLAKE2b-256 checksum
How to use checksums
b9f839c5bccbbc9491a945867295116c18450b1e232e21431906579417a0ab78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / apexbase-1.39.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL apexbase-1.39.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.5 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
731d760ac2e08c63353096b6023885a3a3aa7c9b44dba6906ea476d7b8ba9ffe
BLAKE2b-256 checksum
How to use checksums
e75228a6b0cba2adf26fc4e1d4d3817f9cb7686d830b7d7dc3f39dcfa999f4b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / apexbase-1.39.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL apexbase-1.39.0-cp311-cp311-macosx_11_0_arm64.whl
Size 10.2 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d837afeda1757fbff8e689f284445397249cc303a7b0a19f056b18a1ed3c44fc
BLAKE2b-256 checksum
How to use checksums
d4862be53988f438b07f3be6801fb0f3d7e96933d8ccfe5b6edf44ef1981690a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / apexbase-1.39.0-cp310-cp310-win_amd64.whl

Download URL apexbase-1.39.0-cp310-cp310-win_amd64.whl
Size 11.8 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
77a7e51b583ce25b5b6655f000f177efc29bc8e21d7325920a8b2d288fb365cb
BLAKE2b-256 checksum
How to use checksums
af383d7c73451d96fb7c09bb7b2554c6176a984aebec1efa1614999b50add837
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / apexbase-1.39.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL apexbase-1.39.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.5 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
cc5df7364a8c48a38e008a84128a4a75c5ef3b56d8b16da41023175aec74b6fa
BLAKE2b-256 checksum
How to use checksums
63cd5d487a7552ebfa6e66ca1e0db0ae6dee2bccb15e852e1a2f0ece2d52b23f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / apexbase-1.39.0-cp310-cp310-macosx_11_0_arm64.whl

Download URL apexbase-1.39.0-cp310-cp310-macosx_11_0_arm64.whl
Size 10.2 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
48454a8dc206e5e3735d4828dd6e74d41327a7d478766c651b62b7fdf3bbb981
BLAKE2b-256 checksum
How to use checksums
0cf17ceffb5a62a58fa035daba243000713b75729f98e268c2bca4c78bb17602
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / apexbase-1.39.0-cp39-cp39-win_amd64.whl

Download URL apexbase-1.39.0-cp39-cp39-win_amd64.whl
Size 11.8 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
282e15a320b43b075e09b7b7ea1fcf89c529ba6ef0b9eadcf50343462d1fcb72
BLAKE2b-256 checksum
How to use checksums
d3b9869f131ac189b93b894424697307b6b902e7688826db908ea67a5be505d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / apexbase-1.39.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL apexbase-1.39.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.5 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
dc1803a0219be866bd99b8d6c6b8c7690b4a32a22fee407e7d0a3ef8b1b3ca79
BLAKE2b-256 checksum
How to use checksums
8a038f7b66bd602e5e602238f6cbf0bd73706f694df49fe1e04fc8344d699de7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / apexbase-1.39.0-cp39-cp39-macosx_11_0_arm64.whl

Download URL apexbase-1.39.0-cp39-cp39-macosx_11_0_arm64.whl
Size 10.2 MB
Tags CPython 3.9 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b4a669f14fec26dd4fa44db6010de437866a77fe1568d98941d7d995593be08a
BLAKE2b-256 checksum
How to use checksums
257b836f60f3ae624ffb4d27aa6d07fedb9f38e8b2580e14144cf9d7fc649c3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Security for apexbase 1.39.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

1.39.0 This release

16 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page