Skip to main content

Flaxon SQLAlchemy

flaxon-sqlalchemy gives a Flaxon application one async SQLAlchemy engine and session factory. It owns the engine lifecycle and exposes the integration as app.state.sqlalchemy.

Install

pip install "flaxon-sqlalchemy[postgresql]"
# or: pip install "flaxon-sqlalchemy[sqlite]"

Use an async SQLAlchemy URL, such as postgresql+asyncpg://… or sqlite+aiosqlite:///./app.db.

Use

from flaxon import Flaxon
from flaxon_sqlalchemy import SQLAlchemyPlugin
from sqlalchemy import text

app = Flaxon("store")
await app.plugins.load_plugin(
    SQLAlchemyPlugin("postgresql+asyncpg://user:password@localhost/store")
)


@app.get("/orders")
async def list_orders():
    async with app.state.sqlalchemy.session() as session:
        result = await session.execute(text("SELECT id FROM orders"))
        return {"orders": list(result.scalars())}

The plugin connects during Flaxon's startup lifecycle and disposes its engine during shutdown. Do not construct URLs with unescaped passwords; load them from a secret manager or environment variable.

This package provides connection lifecycle and session access. Define models, migrations, and transaction boundaries in your application.

Metadata

Release files for flaxon-sqlalchemy 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-sqlalchemy 0.1.0
File Size Uploaded Provenance Actions
flaxon_sqlalchemy-0.1.0.tar.gz 4.1 kB Without provenance Details for flaxon_sqlalchemy-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 8.3 kB

Release files / flaxon_sqlalchemy-0.1.0.tar.gz

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

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

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

Security for flaxon-sqlalchemy 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