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, write local .apex table files, run analytical SQL, import/export DataFrames, and optionally expose the same 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, vectorized execution, SQL aggregations, joins, CTEs, windows, and indexes
Low-friction Python workflows ApexClient, Pandas / Polars / PyArrow conversion, file table functions, and simple local persistence
One engine for mixed workloads HTAP design: fast writes, point lookups, analytical scans, transactions, and MVCC
Search built in Full-text search, fuzzy matching, vector TopK search, and float16 embedding storage
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.

Performance At A Glance

Latest local snapshot: ApexBase 1.23.0, 1M-row tabular dataset, 1M-vector dataset, Apple arm, Python 3.12.

Area Snapshot
Fair OLAP + OLTP comparison 72 public tabular metrics tracked; ApexBase wins 71 / 72 in the benchmark harness
GROUP BY city 2.3x faster than DuckDB in the representative snapshot
FTS search 170.2x faster than SQLite in the representative snapshot
Batch vector TopK cosine 10.7x faster than DuckDB in the representative snapshot

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.

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 and Float16 Vectors
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

Download files

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

Source Distribution

apexbase-1.26.0.tar.gz (1.4 MB view details)

Uploaded Source

Built Distributions

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

apexbase-1.26.0-cp313-cp313-win_amd64.whl (10.5 MB view details)

Uploaded CPython 3.13Windows x86-64

apexbase-1.26.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

apexbase-1.26.0-cp313-cp313-macosx_11_0_arm64.whl (9.1 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

apexbase-1.26.0-cp312-cp312-win_amd64.whl (10.5 MB view details)

Uploaded CPython 3.12Windows x86-64

apexbase-1.26.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

apexbase-1.26.0-cp312-cp312-macosx_11_0_arm64.whl (9.1 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

apexbase-1.26.0-cp311-cp311-win_amd64.whl (10.5 MB view details)

Uploaded CPython 3.11Windows x86-64

apexbase-1.26.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

apexbase-1.26.0-cp311-cp311-macosx_11_0_arm64.whl (9.1 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

apexbase-1.26.0-cp310-cp310-win_amd64.whl (10.5 MB view details)

Uploaded CPython 3.10Windows x86-64

apexbase-1.26.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

apexbase-1.26.0-cp310-cp310-macosx_11_0_arm64.whl (9.1 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

apexbase-1.26.0-cp39-cp39-win_amd64.whl (10.5 MB view details)

Uploaded CPython 3.9Windows x86-64

apexbase-1.26.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

apexbase-1.26.0-cp39-cp39-macosx_11_0_arm64.whl (9.1 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file apexbase-1.26.0.tar.gz.

File metadata

  • Download URL: apexbase-1.26.0.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.15

File hashes

Hashes for apexbase-1.26.0.tar.gz
Algorithm Hash digest
SHA256 61ec981ecc0d38e6ee8125f5859f06d633a087f6c039781af403564bc516eec8
MD5 bcc8db68f12201673290fd2a9f252e09
BLAKE2b-256 4d26b66e7b24f978a2b0e41652b6b0509be6250c8ca6d40e3ce1923f5f94fc49

See more details on using hashes here.

File details

Details for the file apexbase-1.26.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: apexbase-1.26.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 10.5 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.15

File hashes

Hashes for apexbase-1.26.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 a35bc6e613defbbd773a2aca97de5f46238de82f5786ff1e134b7b2660b7969d
MD5 8f557852eeecb9742af6c49e59007bc8
BLAKE2b-256 b03c20456e3779f595f7b32d895ac4f9dfeb78e45178f35f356e6fcadaa08a99

See more details on using hashes here.

File details

Details for the file apexbase-1.26.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for apexbase-1.26.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 74dc4bc9f6de2bd6fa8f4c659e408b184ad0a8405b7e61969e701c2726af7b40
MD5 8d79a806fbcb98e4db46c4fe3c70753f
BLAKE2b-256 5f980a77466976a9693fcc871130d6f9bb03a16459feacf97786b84acfc684a0

See more details on using hashes here.

File details

Details for the file apexbase-1.26.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for apexbase-1.26.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 25ae4f397893d9bb28475257fe965d687851aed335a3a3ef79d9d8caa84f3aef
MD5 6ca25711ffbd359ebfd0b9542fa5e9a9
BLAKE2b-256 39cb1b1939b3b84afe393e117565328701092af3864465185c19ff7078117331

See more details on using hashes here.

File details

Details for the file apexbase-1.26.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: apexbase-1.26.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 10.5 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.15

File hashes

Hashes for apexbase-1.26.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c8da92d1ab4c724d7c1e97340c688ac751728de0128e14570729d30df3e451d0
MD5 1855abb8da36c4a5407aa9f4c3d2b3bc
BLAKE2b-256 a895d4de9b4de1b9634ec2e90e50b7f2c058971ac6421ec32a9979769193c3c3

See more details on using hashes here.

File details

Details for the file apexbase-1.26.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for apexbase-1.26.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d2aeb07435e36c473228526cf153091f228dc24c103e47602da98a43983df3cb
MD5 ffbc52b02532226b4fad3bad8679e0ad
BLAKE2b-256 19ed2d346fdd55abc0436aa6a92f9e0170dcf29b55620291d7ac60e9244a2bfe

See more details on using hashes here.

File details

Details for the file apexbase-1.26.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for apexbase-1.26.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0e8ed8f6f397fce286de9a9fd2d9b6c1440264fd7018ae3e94d6266266666747
MD5 bd18341d7376b31446b07795fbb51123
BLAKE2b-256 bc2de5e9cd59527fecbd9d2238b5dd2a7cbc4a35c71c3c920ee40313b3f5f3e8

See more details on using hashes here.

File details

Details for the file apexbase-1.26.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: apexbase-1.26.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 10.5 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.15

File hashes

Hashes for apexbase-1.26.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b8221a29007fda581330aab6c9d2d21192a2e02e7126477d0271ee4f596d6d4c
MD5 d4cf36ec1295dadd9414b0646a8a3314
BLAKE2b-256 3fe468dfbfa764b0f4fab6f25399d8ee94d2caa50a9d3df4196112886b358f9b

See more details on using hashes here.

File details

Details for the file apexbase-1.26.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for apexbase-1.26.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7aa007ec355adfdee63a575abd22cbfc248e3a1f1762c6bb6a5a95f27d2d72c2
MD5 30cc4e6d566746a0c118fb315b2813e9
BLAKE2b-256 60ca4098d77b3b1aa0cec2f2eadb891cdd29636b63459ed8eada92b6450b1601

See more details on using hashes here.

File details

Details for the file apexbase-1.26.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for apexbase-1.26.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 da377b5b9197e8552139fb879c6adc2dffc40381ec0aa1a7bca0dac1b0d049c3
MD5 437af3573e64c99a979c9d2599428837
BLAKE2b-256 c3a3f617aa4f23280c2f3b99a2bd4d47bbeb41e65da4166430e08fce325a87d1

See more details on using hashes here.

File details

Details for the file apexbase-1.26.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: apexbase-1.26.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 10.5 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.15

File hashes

Hashes for apexbase-1.26.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 305fb179145880a110276dc915696933847a67f344571f068bd2c35afb80306f
MD5 87fa67566285760d3283816503a22e11
BLAKE2b-256 23b8f24589588a0d8ed2f3c1a97bb93d834bc2ad2d4010a0dee82fa7a31d729c

See more details on using hashes here.

File details

Details for the file apexbase-1.26.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for apexbase-1.26.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e322c7f8fec928710d0e8b7a5b09102ca8ff475dd0db78ba3aadc3e3c4cecad4
MD5 2b4336903794103a062d65cbfb7660f2
BLAKE2b-256 137d13e27fe1e58058efac7ed00f003e970d91c115e748fe64b682a664a6558b

See more details on using hashes here.

File details

Details for the file apexbase-1.26.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for apexbase-1.26.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8ef3c6b610455d9828e14511e3d034cabf3b90418080a27ac48ec81e8f0215e0
MD5 e0a46d8394f28527a284872f710726ac
BLAKE2b-256 447dc0379f16647b9fa132c2ca667118cccb02ef67853182800b359ef05a40c1

See more details on using hashes here.

File details

Details for the file apexbase-1.26.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: apexbase-1.26.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 10.5 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.15

File hashes

Hashes for apexbase-1.26.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 5f864a6e339852d9bb9d10217452ceda1109f0d0ba8f6a591e3f2e666bd2c2a2
MD5 ccde01c0bed29369839f78b1a0797d96
BLAKE2b-256 543b113c8dc1afa74b4098132ea62091b8ac27d45c9e8f5377d3ed974bb95a8d

See more details on using hashes here.

File details

Details for the file apexbase-1.26.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for apexbase-1.26.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 286fc3da04f12aa285f430d924057dee0a35fa6c8aca4d1824c468725d0bcf95
MD5 1a64addf67a349a54aac1089f2ff4929
BLAKE2b-256 6cfda244c6ed58d60afb754880acbf20c148a634ccbd0f0b9f008512c02ed7d2

See more details on using hashes here.

File details

Details for the file apexbase-1.26.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for apexbase-1.26.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 556dd24935e213998c748793d692f2328ad3fae4f1be34d9aeb1f68fb98264cf
MD5 bfb97015e6aa0a57820c20b41e0f0249
BLAKE2b-256 d574ba8d08c11d78e9649ac4194ff527916c75b4a48679a7565dbee0906c05ae

See more details on using hashes here.

Release history Release notifications | RSS feed

1.31.0

16 files

1.30.0

16 files

1.29.0

16 files

1.28.0

16 files

1.27.0

16 files

This release

1.26.0 This release

16 files

1.25.0

16 files

1.24.0

16 files

1.23.0

16 files

1.22.0

16 files

1.21.0

16 files

1.20.1

16 files

1.20.0

16 files

1.19.1

16 files

1.19.0

16 files

1.18.0

16 files

1.17.0

16 files

1.16.0

16 files

1.15.0

16 files

1.14.0

16 files

1.13.0

16 files

1.12.0

16 files

1.11.0

16 files

1.10.0

16 files

1.9.0

16 files

1.8.0

16 files

1.7.0

16 files

1.6.0

16 files

1.5.0

16 files

1.4.0

16 files

1.3.0

16 files

1.2.0

16 files

1.1.0

16 files

1.0.0

16 files

0.6.0

16 files

0.5.0

16 files

0.4.2

16 files

0.4.0

16 files

0.3.0

16 files

0.2.3

16 files

0.2.2

12 files

0.2.1

2 files

0.2.0

1 file

0.1.0

2 files

0.0.2

2 files

0.0.1

2 files

Supported by

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