Show HN: Onlymaps, a Python Micro-ORM
2 days ago
- #Python
- #Database
- #ORM
- Onlymaps is a Python micro-ORM library for database interactions using plain SQL queries.
- Provides sync and async query execution with fine-grained type-hinting via Pydantic.
- Supports major databases: PostgreSQL, MySQL, MariaDB, MS SQL Server, and SQLite.
- Features connection pooling and custom connection factory support.
- Includes methods like exec, fetch_one, fetch_many, and iter for query execution.
- Supports type validation for query results using Pydantic models or other Python types.
- Handles transactions automatically, with explicit transaction support for batch operations.
- Parameter handling includes JSON conversion and bulk operations.
- Supports various data types for single and multiple column queries, including complex types.