wsqlite is a production-grade SQLite ORM that uses Pydantic models for type-safe database operations. Full async/await support, connection pooling, and automatic schema synchronization.
A production-grade SQLite ORM library engineered for modern Python applications. Built atop Pydantic's type validation system for type-safe database operations.
wsqlite leverages Pydantic models to define database schemas with full type safety. No SQL strings, no manual type conversions — just pure Python with automatic validation.
Perfect for data-intensive applications, microservices, and anywhere SQLite is the right tool for the job.
Define schema with type hints
Pydantic validates all data
Automatic table creation & sync
Get back Pydantic models
Raw SQLite and SQLAlchemy can be complex. wsqlite keeps it simple with Pydantic-powered type safety.
Writing raw SQL strings is error-prone and hard to maintain. wsqlite uses Pydantic models instead.
No compile-time checks for database operations. wsqlite validates everything with Pydantic.
Manual table creation and migrations. wsqlite auto-syncs models to database schema.
Connection overhead in async applications. wsqlite provides connection pooling out of the box.
Everything you need for production-ready SQLite operations with clean Python code.
Define database schemas using familiar Pydantic BaseModel. Full type validation and serialization.
View documentationComplete async/await API for high-throughput scenarios. Async connection pool included.
Async examplesBuilt-in connection pool with configurable size. AsyncConnectionPool for async workloads.
View pool docsModels automatically sync with database structure. No manual migrations needed.
Schema sync docsACID-compliant transaction handling with context managers. Automatic rollback on errors.
Transaction examplesQuery builder with parameterized queries. All inputs are properly escaped.
Query builder docs12 custom exception types for precise error handling. WSQLiteError, ValidationError, and more.
Exception docsFluent SQL construction with JOINs, GROUP BY, HAVING, UNION support.
Query builder examplesComprehensive type validation and serialization. Custom validators supported.
Validator docsBuilt-in benchmarks comparing vs sqlite3, sqlalchemy, and aiosqlite.
View benchmarksComplete API reference with all available classes, methods, and utilities.
Start using wsqlite in minutes with these fundamental patterns.
Install wsqlite in seconds and start building type-safe database operations.
Start creating production-ready SQLite applications with Pydantic-powered type safety.