- Notifications
You must be signed in to change notification settings - Fork9
Asynchronous Python PostgreSQL driver written in Rust
License
psqlpy-python/psqlpy
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Driver for PostgreSQL written fully in Rust and exposed to Python.Main goals of the library is speed and type safety.
You can find full documentation here -PSQLPy documentation
You can install package withpip
orpoetry
.
poetry:
> poetry add psqlpy
pip:
> pip install psqlpy
Or you can build it by yourself. To do it, install stable rust andmaturin.
> maturin develop --release
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.
fromtypingimportAnyfrompsqlpyimportConnectionPool,QueryResultasyncdefmain()->None:db_pool=ConnectionPool(username="postgres",password="pg_password",host="localhost",port=5432,db_name="postgres",max_db_pool_size=2, )asyncwithdb_pool.acquire()asconn:res:QueryResult=awaitconn.execute("SELECT * FROM users", )print(res.result())db_pool.close()
You can find benchmarks with visualization on ourdocs
Let's makePSQLPy
better together!Join our community inTelegram
About
Asynchronous Python PostgreSQL driver written in Rust
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.