Skip to main content

penguin-dal

PyDAL-style database abstraction layer built on SQLAlchemy. One schema (reflected automatically), one query interface — no more defining tables twice.

Installation

pip install penguin-dal

# With database drivers:
pip install penguin-dal[postgresql]   # psycopg2
pip install penguin-dal[asyncpg]      # asyncpg for async
pip install penguin-dal[mysql]        # PyMySQL
pip install penguin-dal[all]          # all drivers

Quick Start

from penguin_dal import DB

db = DB("postgresql://user:pass@localhost/mydb")

users = db(db.users.active == True).select()
pk = db.users.insert(email="new@example.com", name="New User", active=True)
db(db.users.id == pk).update(name="Updated")
db(db.users.id == pk).delete()

Read/Write Splitting

from penguin_dal import DatabaseManager

manager = DatabaseManager(
    write_url="postgresql://primary/myapp",
    read_url="postgresql://replica/myapp",
)
rows = manager.read(manager.read.users).select()
manager.write.users.insert(name="Alice")
manager.close()

📚 Full documentation: docs/penguin-dal/

License

MIT — Penguin Tech Inc

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

penguin_dal-0.4.1.tar.gz (64.8 kB view details)

Uploaded Source

Built Distribution

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

penguin_dal-0.4.1-py3-none-any.whl (50.2 kB view details)

Uploaded Python 3

File details

Details for the file penguin_dal-0.4.1.tar.gz.

File metadata

  • Download URL: penguin_dal-0.4.1.tar.gz
  • Upload date:
  • Size: 64.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for penguin_dal-0.4.1.tar.gz
Algorithm Hash digest
SHA256 0777d5c3af484ccdfa4bbc7f8ba1fef1b14d57af86d2ef88f67d73ec139920d4
MD5 23e6607b2b5905b88100ee8a685702d8
BLAKE2b-256 7b910b6753177b368351ac052761be03add74ee8fb401ab1c2ae5e66e0972120

See more details on using hashes here.

Provenance

The following attestation bundles were made for penguin_dal-0.4.1.tar.gz:

Publisher: publish.yml on penguintechinc/penguin-libs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file penguin_dal-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: penguin_dal-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 50.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for penguin_dal-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ef72e513c47d74868e2f99fa69009d529eeea8172d4d4459b0b6b14b0c3a6188
MD5 a60e000c7768c3aaaf43f81819e3f828
BLAKE2b-256 ff55ea116a53a06ebbbf93786f850e5b1890c3df793219352658930d3c3d9351

See more details on using hashes here.

Provenance

The following attestation bundles were made for penguin_dal-0.4.1-py3-none-any.whl:

Publisher: publish.yml on penguintechinc/penguin-libs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 files

0.4.0

2 files

0.3.0

2 files

0.2.1

2 files

0.1.0

2 files

Supported by

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