This release introduces support for [PostgreSQL](https://www.postgresql.org) as an alternative database, alongside improvements in flexibility and compatibility for database configuration.
New Features
- Added support for [PostgreSQL](https://www.postgresql.org) as a database option.
- To enable [PostgreSQL](https://www.postgresql.org), you need to install the appropriate driver:
bash
pip install ORMagic[postgres]
- Configure the database by setting the `ORMAGIC_DATABASE_URL` environment variable:
bash
ORMAGIC_DATABASE_URL=postgresql://user:passwordlocalhost/dbname
- Note: By default, ORMagic uses [SQLite](https://www.sqlite.org/) and requires no additional setup.
Refactoring
- Introduced the Factory Method design pattern for managing database clients.
This refactor improves code readability and scalability, enabling better support for multiple database backends.
Tests
- Added comprehensive [PostgreSQL](https://www.postgresql.org) testing for all existing test cases to ensure compatibility and reliability.
Testing now covers both [SQLite](https://www.sqlite.org/) and [PostgreSQL](https://www.postgresql.org) configurations.
This update brings significant improvements in database compatibility, internal code structure, and testing coverage, enabling developers to scale their applications with [PostgreSQL](https://www.postgresql.org). For any issues, refer to the [documentation](https://spaceshaman.github.io/ORMagic/).
**Full Changelog**: https://github.com/SpaceShaman/ORMagic/compare/v0.15.0...v0.16.1