百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
P

psqlpy

> 数据库
开源

使用 Rust 编写的异步 Python 和 PostgreSQL 驱动程序

360 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

使用 Rust 编写的异步 Python 和 PostgreSQL 驱动程序

PSQLPy - Async PostgreSQL driver for Python written in Rust.

Driver for PostgreSQL written fully in Rust and exposed to Python. Main goals of the library is speed and type safety.

Documentation

You can find full documentation here - PSQLPy documentation

Installation

You can install package with pip, poetry or uv.

poetry:

bash
poetry add psqlpy

pip:

bash
pip install psqlpy

uv:

bash
uv add psqlpy

Or you can build it by yourself. To do it, install stable rust and maturin.

maturin develop --release

Usage

Usage is as easy as possible. Create new instance of ConnectionPool and start querying. You don't need to startup connection pool, the connection pool will create connections as needed.

python
from psqlpy import ConnectionPool, QueryResult

async def main() -> None:
    db_pool = ConnectionPool(
        username="postgres",
        password="pg_password",
        host="localhost",
        port=5432,
        db_name="postgres",
        max_db_pool_size=2,
    )

    async with db_pool.acquire() as conn:
        res: QueryResult = await conn.execute(
            "SELECT * FROM users",
        )

    print(res.result())
    db_pool.close()

Benchmarks

You can find benchmarks with visualization on our docs

Community

Let's make PSQLPy better together! Join our community in Telegram

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rustasyncioasyncpg-likedatabase-driverhigh-performance

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类数据库
定价开源

> 相关工具

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库