Skip to main content

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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

our_db-0.1.0-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

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

Hashes for our_db-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0839720712c2695662a75584b9cce099939e3ca17904b17bba7a0b4ccdd7d532
MD5 83c84699add63a15fea6db8a49fd527b
BLAKE2b-256 46b854253ff82afaafe4ca629d28d14c8db5a7c903e149ce7daf7ede5efd96ef

See more details on using hashes here.

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

Hashes for our_db-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 392e9c1e26be7db284f174c4f7d22f83742b8555a5daa04e4c2df5b4e43a27d9
MD5 1703d324fb0e88b3a45f1b8f3ef5b6a2
BLAKE2b-256 004c32728b6a9fe351a419db5ad8d758ba9641dc1903a3cf6165993fc79bf571

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page