Skip to main content
Automated test status (Linux and MacOS) Automated test status (Windows) Test coverage

triopg

Welcome to triopg!

PostgreSQL client for Trio based on asyncpg

License: Your choice of MIT or Apache License 2.0

Quick example:

import trio_asyncio
import triopg


async def main():
    async with triopg.connect() as conn:

        await conn.execute(
            """
            DROP TABLE IF EXISTS users;
            CREATE TABLE IF NOT EXISTS users (
                _id SERIAL PRIMARY KEY,
                user_id VARCHAR(32) UNIQUE
            )"""
        )

        async with conn.transaction():
            await conn.execute("INSERT INTO users (user_id) VALUES (1)")
            await conn.execute("INSERT INTO users (user_id) VALUES (2)")
            await conn.execute("INSERT INTO users (user_id) VALUES (3)")

        print(await conn.fetch("SELECT * FROM users"))


trio_asyncio.run(main)

Metadata

Release files for triopg 0.4.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 triopg 0.4.0
File Size Uploaded
triopg-0.4.0.tar.gz 14.5 kB Details

Built distribution (wheel)

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

Total release size: 24.8 kB

Release files / triopg-0.4.0.tar.gz

Download URL triopg-0.4.0.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
27f7c9e508103c8eb1e57100599919cfe5db48fc70a7369bd8a272d520850ccb
BLAKE2b-256 checksum
How to use checksums
42aa2ee9543a30c8832896baa25df71220403a3db2c4cff087a6126de96d7451
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.7

Release files / triopg-0.4.0-py3-none-any.whl

Download URL triopg-0.4.0-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3e75230cd39608ac6e21044d96025ebc7aeceb2eb08009ff13fc786695bd4feb
BLAKE2b-256 checksum
How to use checksums
7bcecb8f8cfb7ff0390987be43a40ed5d47fac30abbf7c770b1bb5cdaa4ca7f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.7

Release history Release notifications | RSS feed

0.6.0

2 release files

0.5.0

2 release files

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

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