PostgreSQL extensions management for DBWarden
Project description
dbwarden-pgsql-extensions
PostgreSQL extension management for DBWarden.
Declare extensions in database_config(pg_extensions=[...]) and this plugin emits CREATE EXTENSION / DROP EXTENSION in the migration preamble, before any table that depends on them.
Object type
| Object type | Manages |
|---|---|
pg_extension |
CREATE EXTENSION IF NOT EXISTS / DROP EXTENSION IF EXISTS |
The handler runs in RunPhase.PREAMBLE, anchored after PREAMBLE and before BEFORE_TABLES, so extension-provided types are available by the time tables are created. Both directions are idempotent and reversible.
Usage
from dbwarden import database_config
database_config(
database_name="primary",
database_type="postgresql",
database_url_sync="postgresql://...",
pg_extensions=["postgis", "hstore"],
)
Installation
dbwarden plugin add dbwarden-pgsql-extensions
Trust tier
This is an official DBWarden plugin. Its distribution name is classified before any of its code is imported, and dbwarden plugin add verifies the PyPI Trusted-Publishing attestation (PEP 740) against dbwarden-org/dbwarden-pgsql-extensions before installing. It loads automatically once installed, with no dbwarden plugin trust step.
Development
uv venv && uv pip install -e . -e ../dbwarden pytest
pytest -q
The tests/test_conformance.py suite runs DBWarden's shared conformance harness (dbwarden.plugin_conformance): entry point resolution, no import-time side effects, hook signatures, public-API-only imports, and idempotent setup().
License
MIT
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 dbwarden_pgsql_extensions-0.1.1.tar.gz.
File metadata
- Download URL: dbwarden_pgsql_extensions-0.1.1.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2eede9d14f39dc2c5a00c92eed59a149b30347000fbc9540d1793c846c311957
|
|
| MD5 |
5fe83c5166a7cdbd92888b5f93ca7a0f
|
|
| BLAKE2b-256 |
7d083c54c5053e1b16582dedc650cbea02187ee75c1ca64679f4ff7aa961b998
|
File details
Details for the file dbwarden_pgsql_extensions-0.1.1-py3-none-any.whl.
File metadata
- Download URL: dbwarden_pgsql_extensions-0.1.1-py3-none-any.whl
- Upload date:
- Size: 13.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ce9bfb987e7e0b7538e68a09b63802e40d20d4f19441dc978755d0e6bfc3760
|
|
| MD5 |
8779958afab6b66ccda44c46876793a8
|
|
| BLAKE2b-256 |
f74d0f00c9a274884147de4630f92e90f77b37da93493a1e8d984811dcda4297
|