Database connectivity and configuration brick
Reason this release was yanked:
Not ready for use
Project description
our-db
Database connectivity, configuration, and migration brick. Part of the ourochronos ecosystem.
Installation
pip install our-db
# With async support
pip install our-db[async]
Usage
from our_db import get_cursor, get_config
# Database access
with get_cursor() as cur:
cur.execute("SELECT * FROM my_table")
rows = cur.fetchall()
# Configuration
config = get_config()
print(config.db_host, config.db_port)
Async
from our_db import async_cursor
async with async_cursor() as conn:
rows = await conn.fetch("SELECT * FROM my_table")
Migrations
from our_db import MigrationRunner
runner = MigrationRunner(migrations_dir="./migrations")
runner.up() # Apply pending
runner.status() # Check status
Development
make dev # Install with dev dependencies
make test # Run tests
make lint # Run linters
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
our_db-0.1.0.tar.gz
(19.5 kB
view details)
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
our_db-0.1.0-py3-none-any.whl
(15.5 kB
view details)
File details
Details for the file our_db-0.1.0.tar.gz.
File metadata
- Download URL: our_db-0.1.0.tar.gz
- Upload date:
- Size: 19.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0839720712c2695662a75584b9cce099939e3ca17904b17bba7a0b4ccdd7d532
|
|
| MD5 |
83c84699add63a15fea6db8a49fd527b
|
|
| BLAKE2b-256 |
46b854253ff82afaafe4ca629d28d14c8db5a7c903e149ce7daf7ede5efd96ef
|
File details
Details for the file our_db-0.1.0-py3-none-any.whl.
File metadata
- Download URL: our_db-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
392e9c1e26be7db284f174c4f7d22f83742b8555a5daa04e4c2df5b4e43a27d9
|
|
| MD5 |
1703d324fb0e88b3a45f1b8f3ef5b6a2
|
|
| BLAKE2b-256 |
004c32728b6a9fe351a419db5ad8d758ba9641dc1903a3cf6165993fc79bf571
|