This release is a pre-release and may not be stable for production use.
SMBDB
SMBDB is an early-stage embedded relational database engine designed for safe, selective access to databases stored on SMB shares. This repository currently contains the project foundation, local and direct SMB storage backends, a versioned database format, immutable column segments, pruning, and adaptive block compression, an initial SQL frontend, and immutable primary-key indexes.
Requires Python 3.11 or newer. See docs/architecture.md and
docs/storage-format.md for the current design.
import smbdb
db = smbdb.create("/tmp/company.smbdb")
db.close()
db = smbdb.connect("/tmp/company.smbdb")
print(db.info())
db.close()
The same SQL API works with a local path or an smb:// URL:
db = smbdb.create("/tmp/company.smbdb")
db.execute("CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT NOT NULL)")
db.execute("INSERT INTO users (id, name) VALUES (?, ?)", [1, "Adam"])
print(db.execute("SELECT name FROM users WHERE id = ?", [1]).fetchall())
db.close()
Direct SMB does not require a mount or a server-side SMBDB process:
db = smbdb.create(
"smb://fileserver/share/company.smbdb",
username="user",
password="secret",
)
db.close()
Development checks:
python3 -m venv .venv
.venv/bin/python -m pip install -e '.[dev]'
.venv/bin/python -m pytest
.venv/bin/ruff check .
.venv/bin/mypy src/smbdb
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file smbdb-0.1.0.dev0-py3-none-any.whl.
File metadata
- Download URL: smbdb-0.1.0.dev0-py3-none-any.whl
- Upload date:
- Size: 64.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96702f46e196ea34fcfc5111498a96ddab40c0c8d85988ba6ce476a77a1aea2c
|
|
| MD5 |
e9e2669ec85cc1b405dacf0295c33ae3
|
|
| BLAKE2b-256 |
a575521440eca97f857f88dfea6bb31bd522360f4272df1eadf749aad6ee7a4c
|