xyberos-db
Database plugin — RFC-0019/0020, M9. The DB-agnostic Database contract
(connect → list_tables → query → close) with a stdlib SQLite reference plus
lazy Postgres / MySQL / DuckDB drivers.
Install
pip install -e ./db
pip install xyberos-db[postgres] # optional drivers
pip install xyberos-db[mysql]
pip install xyberos-db[duckdb]
Usage
from xyberos import create_app
from xyberos_db import DbPlugin
app = create_app()
app.load_plugin(DbPlugin(backend="sqlite")) # in-memory
# app.load_plugin(DbPlugin(dsn="postgres://user:pass@host/db"))
app.tools.execute("db_list_tables", None)
rows = app.tools.execute("db_query", None, sql="SELECT id, name FROM users")
dsn auto-detects the backend (postgres:// / mysql:// / duckdb:// /
anything else → SQLite path). Returns rows as list[dict].
Direct use
from xyberos_db import SqliteDatabase
db = SqliteDatabase("app.db")
db.connect()
print(db.list_tables())
print(db.query("SELECT 1 AS one"))
db.close()
RFC
The contract is specified in RFC-0020-database-plugin-contract.md
(the M9 "Core additive RFC").
Tests
pip install pytest
pytest tests/
SQLite is fully tested; driver adapters skip when their driver is absent.
Ship location
Plugin (xyberos.plugins entry point) + RFC-0020 contract — enterprise DBs (M9).
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 xyberos_db-0.1.0.tar.gz.
File metadata
- Download URL: xyberos_db-0.1.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e278ec2ae2cac71da0a88ecd1f84589a343cd5c6d691884239e2a82b6d1a5bc5
|
|
| MD5 |
9e8730f9bbc9e7e086575edbf73d7e21
|
|
| BLAKE2b-256 |
18f387d342146f535d5045053362bf5361dbd70fb47d8049cb158cec103987c8
|
File details
Details for the file xyberos_db-0.1.0-py3-none-any.whl.
File metadata
- Download URL: xyberos_db-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95536670834d891db3462b5c4ab93ec26b2815ff539a87e1bba1aab9e026e7af
|
|
| MD5 |
ad1ca63880993afdf1afac6042956ec4
|
|
| BLAKE2b-256 |
a2cf823615e097541722901f837520c78609447567ee745a84ef95bc6352b733
|