Skip to main content

b4n1-db — Python SDK

Sovereign embedded data layer. One handle over eight local storage engines — key-value, SQL, graph, documents, queues, vectors, audit and migrations — with no server, no daemon and no network round trip.

The Python package is a thin wrapper: every operation is executed by the b4n1-db engine that ships precompiled inside the wheel for your platform. No compiler, no build step, no separate service to install.

Install

pip install b4n1-db

Wheels are published for Linux (x86_64, arm64), macOS (Intel, Apple silicon) and Windows x86_64. If no wheel matches your platform, pip fails instead of handing you a wrapper that cannot run.

Quick start

from b4n1db import DB

db = DB("./data")

db.kv_put("greeting", b"hello")
print(db.kv_get("greeting"))          # b"hello"

db.sql("CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT)")
db.sql("INSERT INTO users (name) VALUES (?), (?)", ["ada", "grace"])
print(db.sql("SELECT name FROM users ORDER BY name"))   # [{"name": "ada"}, {"name": "grace"}]

print(db.stats())                     # entries, node count, current version

What you get

Capability What it does
Key-value Ordered keys, atomic batches, compare-and-set
SQL Embedded engine with parameters, no external process
Graph Typed nodes and weighted relations with traversal
Documents Structured records with indexed queries
Queues Durable push/pop with visibility windows
Vectors Nearest-neighbour search over local embeddings
Audit Append-only, tamper-evident history with Merkle roots
Migrations Versioned schema steps, applied once, recorded

Everything is local: your data never leaves the machine, and there is no port to open or service to keep alive.

Try it in one command

python -m b4n1db demo

The demo runs against a throwaway database, prints each capability with live numbers, and touches nothing of yours.

Documentation

SDKs in other languages

b4n1-db ships a wrapper for JavaScript, Java, C#, Ruby, PHP and Go with the same surface. See the public mirror for the per-language install command.

License

Wrappers: Business Source License 1.1 (LICENSE). Precompiled binaries: B4N1 End User License Agreement (EULA.txt).

Metadata

Release files for b4n1-db 0.1.1

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

Built distributions (wheels)

Table of built distributions (wheels) for b4n1-db 0.1.1
File Actions
b4n1_db-0.1.1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for b4n1_db-0.1.1-py3-none-win_amd64.whl
b4n1_db-0.1.1-py3-none-manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for b4n1_db-0.1.1-py3-none-manylinux_2_17_x86_64.whl
b4n1_db-0.1.1-py3-none-manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for b4n1_db-0.1.1-py3-none-manylinux_2_17_aarch64.whl
b4n1_db-0.1.1-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for b4n1_db-0.1.1-py3-none-macosx_11_0_arm64.whl
b4n1_db-0.1.1-py3-none-macosx_10_13_x86_64.whl Python 3 none macOS 10.13+ x86-64 Details for b4n1_db-0.1.1-py3-none-macosx_10_13_x86_64.whl

Total release size: 115.9 MB

Release files / b4n1_db-0.1.1-py3-none-win_amd64.whl

Download URL b4n1_db-0.1.1-py3-none-win_amd64.whl
Size 24.3 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
e69c252be7ad5e1fcb0148c57bc54f9c6158554e140749825ca8af49acdf7fec
BLAKE2b-256 checksum
How to use checksums
5feb26beeac22ff814a8f07fd6792c8e904db4ff0b92eb44d72598f30a3bb985
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / b4n1_db-0.1.1-py3-none-manylinux_2_17_x86_64.whl

Download URL b4n1_db-0.1.1-py3-none-manylinux_2_17_x86_64.whl
Size 24.0 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
bb8f45bf1d8041107f5f8e711aa5d691144ad6b4dc6501110884419902a5c5c4
BLAKE2b-256 checksum
How to use checksums
666b54d802b92812766816fcfbb304fce20e7e5e29d8817d9667021fc8c0edca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / b4n1_db-0.1.1-py3-none-manylinux_2_17_aarch64.whl

Download URL b4n1_db-0.1.1-py3-none-manylinux_2_17_aarch64.whl
Size 22.2 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
3bf6a2c9822d1fc32e53b35ce1580712745b57e3d15c6e7408398a93d7564338
BLAKE2b-256 checksum
How to use checksums
9be77bbacd1248c8a5feb02957dd362bd271fff5a9c611a551e863870348ebaf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / b4n1_db-0.1.1-py3-none-macosx_11_0_arm64.whl

Download URL b4n1_db-0.1.1-py3-none-macosx_11_0_arm64.whl
Size 21.7 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6c9a73af798abd2d28f0575f9d33147e7db6c7a1bc7015d6b67f7a4b0742a911
BLAKE2b-256 checksum
How to use checksums
c65c87383b8e74708383713f49cc075918c6a9d1736653e9b2132dc3a15a4c31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / b4n1_db-0.1.1-py3-none-macosx_10_13_x86_64.whl

Download URL b4n1_db-0.1.1-py3-none-macosx_10_13_x86_64.whl
Size 23.6 MB
Tags Python 3 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
571f3e6f71c88984b98aede5df31ea10243653b914e4534792e56266f848ed5d
BLAKE2b-256 checksum
How to use checksums
10ff7a52a5191d2a3a4e93515cd2b38bde1a45784b16975338c87daef906f4e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for b4n1-db 0.1.1

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.

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