$ show pudo/dataset
dataset is a lightweight Python library that simplifies database operations by providing a dict-like interface on top of SQLAlchemy. It automatically creates tables and columns on insert, supports CRUD operations, transactions, and chunked bulk inserts/updates. The library is designed for small to medium-scale data tasks where full ORM overhead is unnecessary. It supports SQLite, PostgreSQL, and MySQL, and is fully type-annotated with mypy strict compliance. The codebase is well-organized into core modules (database, table, types, util, chunked) and has thorough test coverage across all supported backends. While the core abstraction is thin (intentionally), the implementation demonstrates solid engineering discipline with clean APIs, thread safety considerations, and proper handling of SQLAlchemy 2.x quirks.
The LLM identified 2 files worth highlighting for reuse:
Provides context-manager-based chunked insert and update classes (ChunkedInsert, ChunkedUpdate) that buffer rows and flush them in configurable batches. Supports an optional callback for pre-flush processing. This pattern is isolated, reusable for any database-backed bulk operation, and demonstrates clean resource management and decoupling from the main Table class.
Implements a Types class that maps Python types to SQLAlchemy column types with a guess() method inferring column types from sample values. This is a clean, reusable utility for dynamic schema creation, applicable to any project needing automatic type detection from data.