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 and v1.38.0 are the V5 architecture preview releases. Files may declare format version 5 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. 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. 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.38.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.38.0
File Size Uploaded Provenance Actions
apexbase-1.38.0.tar.gz 2.5 MB Without provenance Details for apexbase-1.38.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for apexbase 1.38.0
File Actions
apexbase-1.38.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for apexbase-1.38.0-cp313-cp313-win_amd64.whl
apexbase-1.38.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.38.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
apexbase-1.38.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details for apexbase-1.38.0-cp313-cp313-macosx_11_0_arm64.whl
apexbase-1.38.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for apexbase-1.38.0-cp312-cp312-win_amd64.whl
apexbase-1.38.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.38.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
apexbase-1.38.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for apexbase-1.38.0-cp312-cp312-macosx_11_0_arm64.whl
apexbase-1.38.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for apexbase-1.38.0-cp311-cp311-win_amd64.whl
apexbase-1.38.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.38.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
apexbase-1.38.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details for apexbase-1.38.0-cp311-cp311-macosx_11_0_arm64.whl
apexbase-1.38.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for apexbase-1.38.0-cp310-cp310-win_amd64.whl
apexbase-1.38.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.38.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
apexbase-1.38.0-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details for apexbase-1.38.0-cp310-cp310-macosx_11_0_arm64.whl
apexbase-1.38.0-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details for apexbase-1.38.0-cp39-cp39-win_amd64.whl
apexbase-1.38.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.38.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
apexbase-1.38.0-cp39-cp39-macosx_11_0_arm64.whl CPython 3.9 CPython 3.9 macOS 11.0+ ARM64 Details for apexbase-1.38.0-cp39-cp39-macosx_11_0_arm64.whl

Total release size: 171.5 MB

Release files / apexbase-1.38.0.tar.gz

Download URL apexbase-1.38.0.tar.gz
Size 2.5 MB
Tags Source
SHA-256 checksum
How to use checksums
d41450166db5f3a098a8768910c6c84aba34b1a4fef78965fbe6191dff6b138f
BLAKE2b-256 checksum
How to use checksums
e53ea6dd011ff6da19e11d6d7dcc9f62d05d047f501246b45847d9f8109e26bc
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.38.0-cp313-cp313-win_amd64.whl

Download URL apexbase-1.38.0-cp313-cp313-win_amd64.whl
Size 11.9 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
233318ef6dbf32728e1ef049c54b3e0bf79d0ea7069a5a8eb78fffbd630190c2
BLAKE2b-256 checksum
How to use checksums
291ea9ab699391506bc692c2e577cf1ec983c9e01fca5770fd8fb9b936b2ce3e
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.38.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL apexbase-1.38.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.6 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
60b22f0cfba7d53e2613dbfb80fa6dc5d593a6539cd16bcb1cabe0ab974bb72e
BLAKE2b-256 checksum
How to use checksums
5a56c309403f66d7f75850eb0b53eb2364a685e4f34d5cdd33db0439c9e5d954
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.38.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL apexbase-1.38.0-cp313-cp313-macosx_11_0_arm64.whl
Size 10.3 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
82e549f91b15aac4f2607f79f0d5879436bd28c0e0a11ec5ed86438304d7a51e
BLAKE2b-256 checksum
How to use checksums
305ee46b3a2bdec596e42c6ac70b9dc525998e49d85a66bb522041132fa7151b
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.38.0-cp312-cp312-win_amd64.whl

Download URL apexbase-1.38.0-cp312-cp312-win_amd64.whl
Size 11.9 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
4b938ce6f397ee7d54c3ce8ec68864cb06a5bea67f21cd7b4c26545e3ec76bf1
BLAKE2b-256 checksum
How to use checksums
aba1a4fe3e53399efd951c7046bdc0643fc0c239c6e437c66792792b689598b7
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.38.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL apexbase-1.38.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.6 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
bef524b4127d3bc8fadb8ada05003c106a36ebf55cee10e6864c4e5af4939b59
BLAKE2b-256 checksum
How to use checksums
a1d0e2824680f6c44ecc4c5e100664cc2f8a7fd8b4884d32b429ea1982d3fe2c
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.38.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL apexbase-1.38.0-cp312-cp312-macosx_11_0_arm64.whl
Size 10.3 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
86dbb71bd8145a25e5f898dfb4d939a6ae9972a8f1a6838f6018ec15d0a0ad6d
BLAKE2b-256 checksum
How to use checksums
7834d217287eb3efd8c28a16063e1b93cf940427dfa49a5311884719d359433b
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.38.0-cp311-cp311-win_amd64.whl

Download URL apexbase-1.38.0-cp311-cp311-win_amd64.whl
Size 11.9 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
79f73ce51e5a6bb4395258bdb66ad3c2790f27475e74bc4f5fbc117170d580a1
BLAKE2b-256 checksum
How to use checksums
e09de95a983f21a7e37d7590069cc30ea7c34f07c6217141058321d411adee1e
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.38.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL apexbase-1.38.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.6 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
fe057134eb8566ec17c1fba35fc0946cd4bcf8546a36d7f6ff6c4705ad6ff626
BLAKE2b-256 checksum
How to use checksums
91a67dd1805bb27a8cf437b31df8136287e6cd9ffd83c2b9f9f9acb973159623
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.38.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL apexbase-1.38.0-cp311-cp311-macosx_11_0_arm64.whl
Size 10.3 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d2d453193d8b5346f2e855fe08a3d8cbf8fe967360752f1e0494f05fc9de998b
BLAKE2b-256 checksum
How to use checksums
0b8a8f6220cc4900984392727015c512633ab20cdc4b20eb1bc51205316f0473
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.38.0-cp310-cp310-win_amd64.whl

Download URL apexbase-1.38.0-cp310-cp310-win_amd64.whl
Size 11.9 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
3bde2c9b727d09093e63c96256ead83d1de19519e5abeaa2c57aec4d0b128119
BLAKE2b-256 checksum
How to use checksums
12f8ca94137d3aabe89f1b4407b7ee55bc0b82a5119b8a6c9bfa7fe3ea9c95db
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.38.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL apexbase-1.38.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.6 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
fdd86f8387be850a71dafff1d4a84fbf3c5a9cf964a7b8b3c2d1d16816d9ab96
BLAKE2b-256 checksum
How to use checksums
050184e0aa8234fa5082181d5ba7f7201ac9d0039847c2fd88a1fa484a3ade98
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.38.0-cp310-cp310-macosx_11_0_arm64.whl

Download URL apexbase-1.38.0-cp310-cp310-macosx_11_0_arm64.whl
Size 10.3 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
739cbedf4b661892e7326e58131213263a16c63819f23fa0193807d263ba6a10
BLAKE2b-256 checksum
How to use checksums
d8e4177b5f8b825f704b857392916f024fdb7f4376b1299f745c105743929cfa
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.38.0-cp39-cp39-win_amd64.whl

Download URL apexbase-1.38.0-cp39-cp39-win_amd64.whl
Size 11.9 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
24ff812384e3ac4eeff7354e354307ed04e41a55196d73c93553fd4e11ae892d
BLAKE2b-256 checksum
How to use checksums
69efb6bece05346c586e023b05a7506994aa37a5b1c72f42325c709303ba4bca
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.38.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL apexbase-1.38.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 11.6 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
be1c5accbf4c3d2e7997a1c6e71d4133bce90b1e7ad50302f3705f03c931d6fe
BLAKE2b-256 checksum
How to use checksums
0af47a010fefd6637fa26823d9832b334f41543c297c53bb1b39498215656ae4
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.38.0-cp39-cp39-macosx_11_0_arm64.whl

Download URL apexbase-1.38.0-cp39-cp39-macosx_11_0_arm64.whl
Size 10.3 MB
Tags CPython 3.9 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
680f1b3011ebcdd0bcc0d4b9ce225a924dc8a6bf0d93147b8dff4446862b3576
BLAKE2b-256 checksum
How to use checksums
587bb06b9d066dd5c5e2701ebecebb0df26e134fc2ee8758579fa41d11d314db
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.38.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.38.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