GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - psqlpy-python/psqlpy: Asynchronous Python PostgreSQL driver written in Rust

BranchesTags
Open more actions menu

Latest commit

 

History

730 Commits
730 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
docs
docs
 
 
examples
examples
 
 
psqlpy-stress
psqlpy-stress
 
 
python
python
 
 
src
src
 
 
.env_test.example
.env_test.example
 
 
.gitignore
.gitignore
 
 
.pre-commit-config.yaml
.pre-commit-config.yaml
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
package.json
package.json
 
 
pnpm-lock.yaml
pnpm-lock.yaml
 
 
pyproject.toml
pyproject.toml
 
 
tox.ini
tox.ini
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

PyPI - Python Version PyPI - Python Version PyPI PyPI - Downloads

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:

poetry add psqlpy

pip:

pip install psqlpy

uv:

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.

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

About

Asynchronous Python PostgreSQL driver written in Rust

psqlpy-python.github.io/

Topics

asyncioasyncpg-likedatabase-driverhigh-performancepostgresqlpostgresql-databasepostgresql-driverpsycopg-likepython-driverpython-postgresqlpython3rust

Resources

Readme
MIT license
Activity
Custom properties

Stars

365 stars

Watchers

3 watching

Forks

17 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.