nyxa-postgres — PostgreSQL extras for Nyxa
Optional helpers for apps using nyxa-db
with PostgreSQL. Core nyxa and nyxa-db do not hard-depend on this package.
Install
uv add nyxa-db nyxa-postgres
Or scaffold with Postgres wiring:
uv run nyxa init myapi --database postgres
That adds both packages, a matching DATABASE_URL, and a docker-compose.yml.
URL helper
from nyxa_postgres import postgres_url
url = postgres_url(user="user", password="pass", database="app")
# postgresql+psycopg://user:pass@localhost:5432/app
Soft pool defaults
When DATABASE_URL is a Postgres URL and nyxa-postgres is installed,
nyxa_db.get_engine applies pool_kwargs() (pool_size=5, max_overflow=10,
pool_pre_ping=True). Without this package, engines use SQLAlchemy defaults.
Compose snippet
from nyxa_postgres import compose_snippet
print(compose_snippet()) # postgres:16, user/pass/app on :5432
docker compose up -d
uv run nyxa db migrate
Release files for nyxa-postgres 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nyxa_postgres-0.1.0.tar.gz | 2.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nyxa_postgres-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.1 kB
Release files / nyxa_postgres-0.1.0.tar.gz
| Download URL | nyxa_postgres-0.1.0.tar.gz |
|---|---|
| Size | 2.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6aaf8357ee4239a46709250036b8b20d8343bf4967f648681fc6151327ecb7c1
|
|
BLAKE2b-256 checksum How to use checksums |
bbfe1e9ea5a9f1a84725714bf855e2a3ef61a73aba377729ff522faa8dc12a99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.20 {"installer":{"name":"uv","version":"0.12.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / nyxa_postgres-0.1.0-py3-none-any.whl
| Download URL | nyxa_postgres-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a67938386cd6fbfe4b5986bb3852d771bd15257b8b322164984b6bdce2495e9a
|
|
BLAKE2b-256 checksum How to use checksums |
28052f7d9ee7718a77df590adfe9c3b91d8019d0dc4d44a1c5adb62b41090cc3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.20 {"installer":{"name":"uv","version":"0.12.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|