Skip to content

Commit 6c545ea

Browse files
committed
Add readme
1 parent 16b855d commit 6c545ea

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/psqlpy?style=for-the-badge)](https://pypi.org/project/psqlpy/)
2+
3+
# psqlpy-piccolo
4+
5+
This is a third-party Rust engine for [Piccolo ORM](https://github.com/piccolo-orm/piccolo).
6+
Under the hood, this engine uses [PSQLPy](https://github.com/qaspen-python/psqlpy), which is Rust-based and blazingly fast 🔥.
7+
8+
## Installation
9+
10+
You can install package with `pip` or `poetry`.
11+
12+
poetry:
13+
14+
```bash
15+
> poetry add psqlpy-piccolo
16+
```
17+
18+
pip:
19+
20+
```bash
21+
> pip install psqlpy-piccolo
22+
```
23+
24+
## Usage
25+
26+
Usage is as easy as possible.
27+
PSQLPy based engine has the same interface as other engines from piccolo.
28+
29+
```python
30+
from psqlpy_piccolo import PSQLPyEngine
31+
32+
33+
DB = PSQLPyEngine(
34+
config={
35+
"host": os.environ.get("PG_HOST", "127.0.0.1"),
36+
"port": os.environ.get("PG_PORT", 5432),
37+
"user": os.environ.get("PG_USER", "postgres"),
38+
"password": os.environ.get("PG_PASSWORD", "postgres"),
39+
"database": os.environ.get("PG_DATABASE", "piccolo"),
40+
},
41+
)
42+
```

0 commit comments

Comments
 (0)