Skip to main content

fastasyncpg

Installation

Install latest from pypi

$ pip install fastasyncpg

How to use

Create one Database at import time, and connect it at app startup:

from fastasyncpg.core import Database

db = Database()          # module-level singleton, importable everywhere

async def startup(): await db.connect(database='mydb')

Queries run through the pool by default. transaction (and acquire) make a single connection current for the running task via a ContextVar, so everything inside the block – including table helpers and code called indirectly – joins the transaction, with no handle-passing:

async with db.transaction():
    await db.execute('SELECT 1 FROM "user" WHERE id=$1 FOR UPDATE', uid)
    await db.t.user.update(pk_values=[uid], credits=100)

See the API docs for table access (db.t), auto-generated dataclasses, queue helpers (claim_one), and more.

Metadata

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

Built distribution (wheel)

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

Total release size: 34.4 kB

Release files / fastasyncpg-0.1.0.tar.gz

Download URL fastasyncpg-0.1.0.tar.gz
Size 17.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1f770d9036963d64d2c17814b12765c3ab19c84562ba1bc2ce393648bfcae355
BLAKE2b-256 checksum
How to use checksums
5eb8a7c5b071d297998a8628f7198b9e2ce04a8c3e24e2544628ab374da91eee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

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

Download URL fastasyncpg-0.1.0-py3-none-any.whl
Size 17.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3c6124c03a049adeed0a8b36d3a39e578128c87ec7a58be5e96ebf234c928344
BLAKE2b-256 checksum
How to use checksums
ef9ab7887c9766154288bc01ccc30e83ece8b9b2f2f2677d3e88a6da6e915e49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Security for fastasyncpg 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.

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