Skip to main content

User-friendly extensions for asyncpg

Project description

asyncpgx

Build passed Test coverage Version

Extensions for asyncpg.

Based on the asyncpg and highly inspired by the sqlx package

This package supports 3.6+ python versions

Setup

Use pip install asyncpgx

Purpose

This is a thin wrapper on the asyncpg package. Our purpose is to provide convenient extensions to the original package. We're trying to delegate as much work as we can to the asyncpg (basically our extension methods are high-level proxies to the underlying ones) and make only converting job. Original asyncpg API stays the same, you can see it in the asyncpg documentation.

Functionality

  • queries with named parameters, i.e.
import asyncpgx

connection = await asyncpgx.connect('postgresql://127.0.0.1:5432')
await connection.named_fetch('''SELECT field FROM some_table WHERE id <= :id;''', {'id': 1})
  • prepared statements with named parameters, i.e.
import asyncpgx

connection = await asyncpgx.connect('postgresql://127.0.0.1:5432')
prepared_statement = await connection.named_prepare('''SELECT field FROM some_table WHERE id <= :id;''')
await prepared_statement.named_fetch({'id': 1})

Documentation

You can find project documentation here

Changelog

You can find all releases description here

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

asyncpgx-1.5.0.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

asyncpgx-1.5.0-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file asyncpgx-1.5.0.tar.gz.

File metadata

  • Download URL: asyncpgx-1.5.0.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.11.0 Linux/5.15.0-1022-azure

File hashes

Hashes for asyncpgx-1.5.0.tar.gz
Algorithm Hash digest
SHA256 2504c4831cd143a4e79216fc356500ed56a30b156be9740a3bf658d67f279412
MD5 0254a14b18aab72adb992e7349bcf837
BLAKE2b-256 3f5265dbc280ed190fbc76d816fb1e015284911362c02f15b72e608670b1600e

See more details on using hashes here.

File details

Details for the file asyncpgx-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: asyncpgx-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.11.0 Linux/5.15.0-1022-azure

File hashes

Hashes for asyncpgx-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ef4ae8795423485a2ad8b18974fdeb830e25db2518b2c911087388879208b7e1
MD5 2d647a17d7b27e223256563179284c22
BLAKE2b-256 41c66c20bfeef560542f83531dffbca03acf1b331b078017d6767e1743a0cdcf

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page