neobot-storage
SQLAlchemy 2.0 async storage layer for NeoBot. Implements the repository and unit-of-work ports defined in neobot-contracts.
Usage
from neobot_storage import create_engine, make_uow_factory
engine = create_engine("sqlite+aiosqlite:///neobot.db")
uow_factory = make_uow_factory(engine)
async with uow_factory() as uow:
await uow.messages.save_message(msg)
await uow.commit()
Migrations
Migrations are run automatically on app startup via run_migrations(db_url) (absolute path
is injected, so no database file is created inside the source tree).
To run the Alembic CLI manually, always pass an absolute database path:
cd packages/storage/src/neobot_storage
alembic -x db_url=sqlite+aiosqlite:////absolute/path/to/neobot.db upgrade head
alembic.ini intentionally leaves sqlalchemy.url empty; a relative URL there would create a
stray empty neobot.db in the working directory (which must never be committed).
Metadata
Release files for neobot-storage 1.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| neobot_storage-1.2.2.tar.gz | 31.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| neobot_storage-1.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 88.4 kB
Release files / neobot_storage-1.2.2.tar.gz
| Download URL | neobot_storage-1.2.2.tar.gz |
|---|---|
| Size | 31.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
00f0f285c505360d06f8c5b6f382029c041f89f5ca2c02c764ac1a43cba9cc3b
|
|
BLAKE2b-256 checksum How to use checksums |
da373a6d945b24ebd8e9a88bb9d10f10829916ec0c6d7c82f9fa4fbbd680cfad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / neobot_storage-1.2.2-py3-none-any.whl
| Download URL | neobot_storage-1.2.2-py3-none-any.whl |
|---|---|
| Size | 56.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6dff319c57c23c09590147b118366fb08a5d7eba4355f84dde1493711481ac23
|
|
BLAKE2b-256 checksum How to use checksums |
3d3215918644bfa1fb48a3997c11a98ed8d7e3f329f1ab247ec75e9d3d0c4a47
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|