httk.store.backend.postgresql.engine¶
PostgreSQL database construction for Backend.
Functions¶
|
Build a PostgreSQL-backed backend from a |
Module Contents¶
- httk.store.backend.postgresql.engine.database(cls, url, *, database=None)¶
Build a PostgreSQL-backed backend from a
postgresql://URL.PostgreSQL is fully transactional and rides the existing
"transactional"write profile with no special-casing. Only the psycopg 3 driver is supported: a barepostgresql://URL is normalized topostgresql+psycopg://(SQLAlchemy 2.0 would otherwise select psycopg2), and any other explicit driver is rejected.- Parameters:
- Returns:
The configured PostgreSQL backend wrapper.
- Raises:
ImportError – If
psycopg(psycopg 3) is not installed; install thehttk-store[postgresql]extra to useBackend.postgresql().ValueError – If the URL names a driver other than
postgresql+psycopg(psycopg 3).
- Return type: