Skip to content

Commit 30f034e

Browse files
committed
chore: update readme head
1 parent e9ba705 commit 30f034e

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

README.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
# Py-PGlite
22

3-
<img src="https://github.com/user-attachments/assets/3c6ef886-5075-4d82-a180-a6b1dafe792b" alt="py-pglite Logo" width="60" align="left" style="margin-right: 16px;"/>
4-
5-
**Instant PostgreSQL for Python testing**
6-
7-
`pip install py-pglite`
8-
9-
<br clear="all"/>
10-
11-
```python
12-
def test_users(pglite_session):
3+
<div style="display: flex; align-items: flex-start;">
4+
<div style="flex: 0 0 auto; margin-right: 18px;">
5+
<img src="https://github.com/user-attachments/assets/3c6ef886-5075-4d82-a180-a6b1dafe792b" alt="py-pglite Logo" width="160" style="border-radius: 8px;"/>
6+
</div>
7+
<div style="flex: 1;">
8+
<p><strong>Instant PostgreSQL for Python testing</strong> ⚡</p>
9+
<p><code>pip install py-pglite</code></p>
10+
<pre><code class="language-python">def test_users(pglite_session):
1311
user = User(name="Alice")
1412
pglite_session.add(user)
1513
pglite_session.commit()
16-
assert user.id == 1 # It's real PostgreSQL!
17-
```
14+
assert user.id == 1 # It's real PostgreSQL!</code></pre>
15+
<p><strong>That's it.</strong> No Docker, no setup, no config files. Real PostgreSQL, instant testing.</p>
16+
</div>
17+
</div>
1818

19-
**That's it.** No Docker, no setup, no config files. Real PostgreSQL, instant testing.
19+
<br clear="all"/>
2020

2121
[![CI](https://github.com/wey-gu/py-pglite/actions/workflows/ci.yml/badge.svg)](https://github.com/wey-gu/py-pglite/actions/workflows/ci.yml) [![PyPI](https://badge.fury.io/py/py-pglite.svg)](https://badge.fury.io/py/py-pglite) [![Python](https://img.shields.io/pypi/pyversions/py-pglite.svg)](https://pypi.org/project/py-pglite/)
2222

@@ -254,21 +254,25 @@ pytest tests/django/ # Auto-isolated
254254
---
255255

256256
<<<<<<< HEAD
257+
257258
# Custom configuration
259+
258260
config = PGliteConfig(
259261
timeout=30,
260262
cleanup_on_exit=True,
261263
log_level="DEBUG"
262264
)
263265

264266
# Manual management
267+
265268
with PGliteManager(config) as manager:
266269
engine = manager.get_engine()
267270
SQLModel.metadata.create_all(engine)
268-
271+
269272
with Session(engine) as session:
270273
# Your database operations here
271274
pass
275+
272276
```
273277
274278
## 🔧 Features
@@ -474,6 +478,7 @@ def test_with_custom_cleanup(pglite_engine):
474478
# Custom cleanup if needed
475479
utils.clean_database_data(pglite_engine)
476480
```
481+
477482
=======
478483
*py-pglite: Because testing should be simple.*
479484
>>>>>>> 7555fb5 (feat & refactor: decouple sqlalchemy, introduce django & pytest-django)

0 commit comments

Comments
 (0)