Skip to main content

Flaxon PostSQL

flaxon-postsql is a lightweight PostgreSQL wrapper built on asyncpg. It owns an async connection pool and exposes it as app.state.postsql.

Install

pip install flaxon-postsql

Use

import os

from flaxon import Flaxon
from flaxon_postsql import PostSQLPlugin

app = Flaxon("catalog")
await app.plugins.load_plugin(PostSQLPlugin(os.environ["DATABASE_URL"], min_size=2, max_size=10))


@app.get("/products")
async def list_products():
    rows = await app.state.postsql.fetch("SELECT id, name FROM products ORDER BY id")
    return {"products": [dict(row) for row in rows]}

The connection pool opens during application startup and closes during shutdown. Always use positional $1, $2, … parameters with asyncpg; do not build SQL with string interpolation. Store the database URL in a secret manager or environment variable.

This project is named postsql at the package level but integrates with PostgreSQL through asyncpg.

Metadata

Release files for flaxon-postsql 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flaxon-postsql 0.1.0
File Size Uploaded Provenance Actions
flaxon_postsql-0.1.0.tar.gz 4.1 kB Without provenance Details for flaxon_postsql-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for flaxon-postsql 0.1.0
File Interpreter ABI Platform Actions
flaxon_postsql-0.1.0-py3-none-any.whl Python 3 none any Details for flaxon_postsql-0.1.0-py3-none-any.whl

Total release size: 8.2 kB

Release files / flaxon_postsql-0.1.0.tar.gz

Download URL flaxon_postsql-0.1.0.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
14c49334704725bd61f2a08fa1de0f214d525be7753ea6206c80a5a65afd9d95
BLAKE2b-256 checksum
How to use checksums
da6648812348a26292b5530461ab2fc27f3d3e964f10ca677609c155b8a66d1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release files / flaxon_postsql-0.1.0-py3-none-any.whl

Download URL flaxon_postsql-0.1.0-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ab465f63abcb11cd5a302ebd5c1940e34fedfa67a0d975f041681afd7d2af081
BLAKE2b-256 checksum
How to use checksums
441e46d60c8319c1edb11421c5e07aac44083ec53342c80fb9dc991246d66c38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Security for flaxon-postsql 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page