SQLAlchemy runtime wrapper with PyDAL ergonomics for Penguin Tech applications
Project description
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/
- README — complete feature overview
- API Reference — all classes and methods
- Changelog
- Migration Guide — migrating from PyDAL or upgrading to 0.2.x
License
AGPL-3.0 — Penguin Tech Inc
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
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 penguin_dal-0.2.1.tar.gz.
File metadata
- Download URL: penguin_dal-0.2.1.tar.gz
- Upload date:
- Size: 28.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52caa11e9eef65041bf996113e1ca7195ea4a078d780e11b3bb3fed4011f4a6e
|
|
| MD5 |
2087a6f284a67ab243da15213f62e13b
|
|
| BLAKE2b-256 |
c2f14344fe2933aa4fd00578e4e91ea106ceb56cae16b833aa43513fd7193933
|
Provenance
The following attestation bundles were made for penguin_dal-0.2.1.tar.gz:
Publisher:
publish.yml on penguintechinc/penguin-libs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
penguin_dal-0.2.1.tar.gz -
Subject digest:
52caa11e9eef65041bf996113e1ca7195ea4a078d780e11b3bb3fed4011f4a6e - Sigstore transparency entry: 1209262607
- Sigstore integration time:
-
Permalink:
penguintechinc/penguin-libs@36861ceb9e3a39e1f6c6024a09ea8da205e3cfa2 -
Branch / Tag:
refs/tags/penguin-dal-v0.2.1 - Owner: https://github.com/penguintechinc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@36861ceb9e3a39e1f6c6024a09ea8da205e3cfa2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file penguin_dal-0.2.1-py3-none-any.whl.
File metadata
- Download URL: penguin_dal-0.2.1-py3-none-any.whl
- Upload date:
- Size: 20.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d750532f956c663e195fd1d1512b2b523b249e3ba11243282e58630e78690bf7
|
|
| MD5 |
76c17c0fd57377d02fb8b5b50aef24e0
|
|
| BLAKE2b-256 |
21f50f747577831b2fbea9013c665d720cd439ca4367be3d81af607a4cddb833
|
Provenance
The following attestation bundles were made for penguin_dal-0.2.1-py3-none-any.whl:
Publisher:
publish.yml on penguintechinc/penguin-libs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
penguin_dal-0.2.1-py3-none-any.whl -
Subject digest:
d750532f956c663e195fd1d1512b2b523b249e3ba11243282e58630e78690bf7 - Sigstore transparency entry: 1209262639
- Sigstore integration time:
-
Permalink:
penguintechinc/penguin-libs@36861ceb9e3a39e1f6c6024a09ea8da205e3cfa2 -
Branch / Tag:
refs/tags/penguin-dal-v0.2.1 - Owner: https://github.com/penguintechinc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@36861ceb9e3a39e1f6c6024a09ea8da205e3cfa2 -
Trigger Event:
push
-
Statement type: