Get the latest tech news

Test Postgres in Python Like SQLite


PGlite wrapper in Python for testing. Test your app with Postgres just as lite as SQLite. - wey-gu/py-pglite

🐍 Pythonic: Native support for SQLAlchemy & SQLModel in your tests 🧊 Fully Isolated: Every test module gets its own fresh database 🦾 100% Compatible: True PostgreSQL features via PGlite 🧩 Pytest Plug-and-Play: Ready-to-use fixtures for instant productivity Fork the repository Create a feature branch Make your changes Add tests for new functionality Run the development workflow: python hacking.py Submit a pull request Use pglite_session fixture for automatic cleanup between tests Use pglite_engine fixture when you need direct engine access Use utility functions for efficient database operations Consider custom configurations for specific test requirements

Get the Android app

Or read this on Hacker News

Read more on:

Photo of python

python

Photo of test postgres

test postgres

Related news:

News photo

Ovld – Efficient and featureful multiple dispatch for Python

News photo

Making C and Python Talk to Each Other

News photo

Mistral launches API for building AI agents that run Python, generate images, perform RAG and more