Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

aioworkers-pg

PyPI - Python Version PyPI

Asyncpg plugin for aioworkers.

Usage

Add this to aioworkers config.yaml:

db:
  cls: aioworkers_pg.base.Connector
  dsn: postgresql:///test

You can get access to postgres anywhere via context:

await context.db.execute('CREATE TABLE users(id serial PRIMARY KEY, name text)')
await context.db.execute(users.insert().values(name='Bob'))

Storage

storage:
  cls: aioworkers_pg.storage.RoStorage
  dsn: postgresql:///test
  table: mytable  # optional instead custom sql
  key: id
  get: SELECT * FROM mytable WHERE id = :id  # optional custom sql
  format: dict  # or row

Development

Install dev requirements:

poetry install

Run postgres:

docker run --rm -p 5432:5432 --name postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=test -d postgres

Run tests:

pytest

Metadata

Release files for aioworkers-pg 0.2.1a6

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

Source distribution (sdist)

Source distribution for aioworkers-pg 0.2.1a6
File Size Uploaded
aioworkers-pg-0.2.1a6.tar.gz 7.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aioworkers-pg 0.2.1a6
File Interpreter ABI Platform
aioworkers_pg-0.2.1a6-py3-none-any.whl Python 3 none any Details

Total release size: 17.0 kB

Release files / aioworkers-pg-0.2.1a6.tar.gz

Download URL aioworkers-pg-0.2.1a6.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5699517b7bd9bd10c0a9b331183e0bf4021d92a66309d66410f5a7407d1a4856
BLAKE2b-256 checksum
How to use checksums
042ba68a8e225c4034194d1d93170929fdee512b522cd0eacc1d54a4e4f02f9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.8.7 Linux/5.4.0-1039-azure

Release files / aioworkers_pg-0.2.1a6-py3-none-any.whl

Download URL aioworkers_pg-0.2.1a6-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ae27e9e6cbcbef7d7cfbc52bff16f38c53a3d4c6f6361881549e4d1eb3d11122
BLAKE2b-256 checksum
How to use checksums
7d03d86eec54d673cab6698e88865a54a53eb1bb9315d019eb410dfd3876bcdc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.8.7 Linux/5.4.0-1039-azure
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