# Type-Safe Python ORMs and Query Builders

> Search results for `type-safe ORM and query builder for Python` on awesome-repositories.com. 112 total matches; showing the first 50.

Explore on the web: https://awesome-repositories.com/q/type-safe-orm-and-query-builder-for-python

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [this search on awesome-repositories.com](https://awesome-repositories.com/q/type-safe-orm-and-query-builder-for-python).**

## Results

- [drizzle-team/drizzle-orm](https://awesome-repositories.com/repository/drizzle-team-drizzle-orm.md) (34,835 ⭐) — Drizzle ORM is a TypeScript-native database toolkit providing type-safe SQL query building, schema management, and automated migrations across PostgreSQL, MySQL, SQLite, and SingleStore.
- [electric-sql/pglite](https://awesome-repositories.com/repository/electric-sql-pglite.md) (14,707 ⭐) — Pglite is a client-side relational database engine that runs a full-featured PostgreSQL instance directly within browser and Node.js environments. By leveraging WebAssembly, it provides a persistent SQL storage solution that enables complex data management and querying without requiring an external database server.

The project distinguishes itself through a reactive SQL data layer that automatically synchronizes user interface components with live query results. It manages database operations using worker threads to prevent main-thread blocking and coordinates access across multiple browser t
- [prisma/prisma](https://awesome-repositories.com/repository/prisma-prisma.md) (46,366 ⭐) — Prisma is a database toolkit that provides a unified access layer for interacting with relational and document databases. It centers on a declarative schema modeling approach, where developers define their data structures in a human-readable language. This schema serves as the single source of truth, from which the toolkit automatically generates type-safe database clients that provide compile-time validation and editor autocomplete for all data operations.

The project distinguishes itself through a high-performance, Rust-based query engine that handles query planning and connection pooling o
- [mikro-orm/mikro-orm](https://awesome-repositories.com/repository/mikro-orm-mikro-orm.md) (9,085 ⭐) — Mikro-ORM is a TypeScript-based object-relational mapping system that provides a unified persistence layer for Node.js applications. It translates TypeScript entities into relational or document-based database schemas, supporting a variety of engines including PostgreSQL, MySQL, MariaDB, MS SQL Server, SQLite, and MongoDB.

The project implements the data mapper pattern to decouple in-memory domain models from the database persistence layer. It utilizes a unit of work pattern to track entity changes in memory and commit them in a single coordinated database transaction.

The library covers com
- [doctrine/orm](https://awesome-repositories.com/repository/doctrine-orm.md) (10,172 ⭐) — Doctrine ORM is a PHP object-relational mapper that connects application objects to relational database tables. It uses the data mapper and identity map patterns to decouple the in-memory object model from the database schema, allowing developers to manage data persistence without writing manual SQL.

The project features a dedicated object-oriented query language and programmatic builder for retrieving data based on entities rather than tables. It implements a unit-of-work system to track object changes during a request and synchronize them via atomic transactions.

The capability surface inc
- [laravel/laravel](https://awesome-repositories.com/repository/laravel-laravel.md) (84,489 ⭐) — Laravel is a comprehensive full-stack web framework designed for building scalable server-side applications. It provides an integrated development environment that centers on an object-relational mapper for database abstraction, a robust routing system, and a sophisticated service container for dependency injection. The framework is built to handle complex application requirements through a modular architecture that emphasizes convention over configuration.

What distinguishes Laravel is its deep integration of background processing and event-driven communication. It features a task queue orch
- [hibernate/hibernate-orm](https://awesome-repositories.com/repository/hibernate-hibernate-orm.md) (6,447 ⭐) — Hibernate ORM is a Java object-relational mapper and a full implementation of the Jakarta Persistence API. It serves as a SQL database abstraction layer that translates Java object models into relational database schemas to manage data persistence and lifecycles.

The framework distinguishes itself with a multi-tenant data isolation framework for separating customer data within a single database instance. It also features a database schema generator that automatically produces and updates relational structures based on entity mappings.

The system covers broad capability areas including transa
- [ukrbublik/react-awesome-query-builder](https://awesome-repositories.com/repository/ukrbublik-react-awesome-query-builder.md) (2,257 ⭐) — User-friendly query builder for React
- [prismagraphql/prisma](https://awesome-repositories.com/repository/prismagraphql-prisma.md) (16,393 ⭐) — Prisma is a type-safe database object-relational mapper that uses a declarative schema to map data models to relational and document databases. It provides a unified toolkit for data access, combining a database driver with tools for schema management and record manipulation.

The project features a multi-database driver that standardizes interactions across PostgreSQL, MySQL, and MongoDB. It includes a system for tracking and applying structural schema migrations across different environments and a graphical user interface for browsing and editing database records.

The system ensures data in
- [fbsamples/f8app](https://awesome-repositories.com/repository/fbsamples-f8app.md) (13,906 ⭐) — f8app is a cross-platform mobile reference application implementation that serves as a technical architecture guide for building complex features in a production environment. It is built as a React Native mobile application using a component-based architecture to manage the user interface and application state.

The project implements a dockerized backend environment, running a database, server, and dashboard as a group of coordinated containers to ensure consistent development environments. It further integrates a GraphQL data fetching system that uses a structured schema and compiler to ensu
- [bokwoon95/go-structured-query](https://awesome-repositories.com/repository/bokwoon95-go-structured-query.md) (201 ⭐) — Type safe SQL query builder and struct mapper for Go
- [solidexpert-ltd/ngx-query-builder](https://awesome-repositories.com/repository/solidexpert-ltd-ngx-query-builder.md) (4 ⭐) — A modern Angular (v15+) query builder inspired by jQuery QueryBuilder and rebuilt with standalone components. It ships sensible defaults, rich templating hooks, and full forms support so you can compose visual query editors that match your domain.
- [avelino/awesome-go](https://awesome-repositories.com/repository/avelino-awesome-go.md) (175,576 ⭐) — This project serves as a comprehensive language ecosystem index, functioning as a centralized, community-curated directory for the Go programming language. It organizes a vast landscape of software components, libraries, and development tools into a structured, navigable hierarchy, enabling developers to efficiently discover resources tailored to specific functional domains.

The repository distinguishes itself through a decentralized contribution model, where community-driven updates ensure the index remains current with the rapidly evolving software landscape. Beyond simple resource listing,
- [fastapi/sqlmodel](https://awesome-repositories.com/repository/fastapi-sqlmodel.md) (18,137 ⭐) — SQLModel is a type-safe object-relational mapping library for Python that integrates database schema definitions with data validation logic. By combining these two roles into a single class, it allows developers to manage relational data structures and enforce data integrity for web APIs simultaneously. The framework is built to support asynchronous database operations, enabling high-performance applications to execute queries and transactions without blocking the main execution thread.

The library distinguishes itself by leveraging Python type hints to provide IDE autocompletion and compile-
- [thomasmikava/testing-library-queries](https://awesome-repositories.com/repository/thomasmikava-testing-library-queries.md) (1 ⭐) — Enhanced query builder for Testing Library with custom selectors and composable queries. Write cleaner, more maintainable tests with type-safe query composition.
- [realm/realm-js](https://awesome-repositories.com/repository/realm-realm-js.md) (6,001 ⭐) — Realm is a mobile database: an alternative to SQLite & key-value stores
- [honojs/hono](https://awesome-repositories.com/repository/honojs-hono.md) (30,994 ⭐) — Hono is a lightweight web framework built on Web Standard APIs that executes across JavaScript runtimes including Cloudflare Workers, Deno, Bun, and Node.js.
- [kracekumar/python-typing-koans](https://awesome-repositories.com/repository/kracekumar-python-typing-koans.md) (120 ⭐) — A set of examples to learn optional static typing in Python.
- [surrealdb/surrealdb](https://awesome-repositories.com/repository/surrealdb-surrealdb.md) (32,397 ⭐) — SurrealDB is a multi-model database engine designed to store and query document, graph, relational, and vector data within a single ACID-compliant platform. It functions as an AI-native data store, integrating vector search, graph traversal, and machine learning model execution directly into its query layer. By providing a unified declarative query language, the platform eliminates the need for external middleware to synchronize data across different storage models.

The platform distinguishes itself through its ability to manage agent memory and complex workflows natively. It allows developer
- [mybatis-flex/mybatis-flex](https://awesome-repositories.com/repository/mybatis-flex-mybatis-flex.md) (2,554 ⭐) — MyBatis-Flex is an object-relational mapping framework for Java that extends MyBatis with a fluent API and automated CRUD operations. It provides a data access suite featuring an automatic CRUD data mapper, a type-safe SQL query builder, and a row-based query engine for manipulating records without predefined entity classes.

The framework includes a multi-dialect SQL translator that converts generated syntax across different database engines, such as MySQL, PostgreSQL, and Oracle. It further distinguishes itself by offering annotation-free entity mapping using runtime reflection and naming co
- [stephencelis/sqlite.swift](https://awesome-repositories.com/repository/stephencelis-sqlite-swift.md) (10,167 ⭐) — SQLite.swift is a type-safe Swift wrapper and object-relational mapping layer that provides a bridge for interacting with SQLite databases. It functions as a database driver that allows for embedded database management and local data persistence within Swift applications.

The project distinguishes itself through a type-safe expression builder that verifies SQL statement syntax and intent at compile time. It includes specialized support for high-performance text matching via full-text search integration and provides mechanisms for securing sensitive data through database encryption.

The libra
- [sergio9929/pb-query](https://awesome-repositories.com/repository/sergio9929-pb-query.md) (39 ⭐) — Build type-safe PocketBase queries using TypeScript. Flexible and strongly-typed, with useful helpers to simplify the querying process.
- [filamentphp/filament](https://awesome-repositories.com/repository/filamentphp-filament.md) (31,215 ⭐) — Filament is a full-stack framework for building administrative panels and management interfaces within the Laravel ecosystem. It provides a declarative, component-based architecture that allows developers to construct complex, data-driven applications using server-side configuration objects rather than manual HTML. By inspecting database model structures and relationships, the framework automates the generation of CRUD interfaces, forms, and data tables, significantly reducing boilerplate code.

The project distinguishes itself through a highly modular and extensible design that supports custo
- [metabase/metabase](https://awesome-repositories.com/repository/metabase-metabase.md) (47,696 ⭐) — Metabase is a business intelligence platform designed to connect to various storage systems and relational databases for data exploration, visualization, and reporting. It provides a centralized environment where users can build queries through a graphical interface or raw code, transforming raw information into interactive dashboards and charts. The platform is built to support self-service analytics, allowing non-technical team members to extract insights without requiring deep knowledge of database syntax.

The platform distinguishes itself through a metadata-driven modeling layer that abst
- [encode/orm](https://awesome-repositories.com/repository/encode-orm.md) (1,863 ⭐) — An async ORM. 🗃
- [googlecontainertools/skaffold](https://awesome-repositories.com/repository/googlecontainertools-skaffold.md) (15,856 ⭐) — Skaffold is a command-line tool that automates the build, push, and deployment lifecycle for containerized applications on Kubernetes. It functions as a continuous development engine, monitoring source code for changes to trigger incremental updates, manifest hydration, and automated deployments to a cluster. By abstracting the underlying build and deployment tools, it provides a unified interface for managing the inner development loop.

The platform distinguishes itself through its environment-aware configuration and flexible build orchestration. It supports diverse build strategies, includi
- [cycle/orm](https://awesome-repositories.com/repository/cycle-orm.md) (1,328 ⭐) — PHP DataMapper, ORM
- [jackc/pgx](https://awesome-repositories.com/repository/jackc-pgx.md) (13,428 ⭐) — This project is a database driver and interface for the Go programming language, specifically designed for PostgreSQL. It provides a low-level library for executing SQL queries, managing transactions, and handling data persistence within Go applications.

The driver distinguishes itself by implementing the native PostgreSQL binary wire protocol, which minimizes communication overhead and maximizes data transfer efficiency. It includes advanced connection pooling to maintain persistent database sessions and supports prepared statement caching to accelerate the execution of frequently repeated o
- [qax-os/excelize](https://awesome-repositories.com/repository/qax-os-excelize.md) (20,682 ⭐) — Excelize is a library for reading and writing spreadsheet files in the Office Open XML format. It provides a comprehensive suite of tools for programmatically creating, modifying, and analyzing workbooks, worksheets, and cell data, ensuring compatibility across various office software suites through structured XML serialization.

The library distinguishes itself with a built-in formula calculation engine that evaluates complex mathematical and logical expressions directly against workbook data. It also features a memory-mapped streaming architecture, which allows for the efficient processing o
- [jooq/jooq](https://awesome-repositories.com/repository/jooq-jooq.md) (6,666 ⭐) — jOOQ is a type-safe SQL query builder for Java that generates code from live database schemas, enabling compile-time validation of SQL syntax and data types. Its core identity is built around a fluent DSL that mirrors SQL structure, a code generator that maps tables, views, and routines to Java objects, and a multi-dialect engine that translates the same DSL into vendor-specific SQL for over 30 databases. The project also includes a SQL parser and transformer for refactoring or dialect conversion, reactive stream integration for non-blocking query execution, and a JDBC proxy diagnostics tool f
- [tortoise/tortoise-orm](https://awesome-repositories.com/repository/tortoise-tortoise-orm.md) (5,582 ⭐) — Tortoise ORM is an asynchronous object-relational mapper for Python that mirrors Django's model and queryset API while running on asyncio. It defines database tables as Python classes with typed fields and supports foreign key, many-to-many, and one-to-one relations, providing a chainable query API for filtering, annotating, grouping, and prefetching related objects without blocking the event loop.

The ORM includes a built-in migration engine that detects model changes, generates migration files, and applies or reverts schema changes through a command-line tool. It connects to PostgreSQL, MyS
- [doctrine/dbal](https://awesome-repositories.com/repository/doctrine-dbal.md) (9,699 ⭐) — This project is a SQL database abstraction layer that provides a consistent object-oriented interface for interacting with multiple relational database systems. It includes a driver wrapper to standardize connections and result sets, a fluent query builder for constructing portable SQL statements, and a type mapper for converting database-specific data types into native application types and vice versa.

The library enables programmatic schema management through a schema manager that can introspect database metadata, model structures as objects, and generate the SQL required to migrate between
- [emdash-cms/emdash](https://awesome-repositories.com/repository/emdash-cms-emdash.md) (10,887 ⭐) — EmDash is an open-source content management system built on Astro that combines a visual admin panel with a plugin-driven architecture and server-side rendering. It provides a complete content management system with structured content modeling, a rich text editor using Portable Text format, and a TypeScript API for type-safe content queries. The system supports authentication through passkeys, OAuth 2.1, and external providers, with role-based access control and fine-grained permission scopes.

What distinguishes EmDash is its plugin development framework, which supports both native plugins ru
- [laravel-doctrine/orm](https://awesome-repositories.com/repository/laravel-doctrine-orm.md) (838 ⭐) — An integration library for Laravel and Doctrine ORM
- [danieleteti/delphi-orm](https://awesome-repositories.com/repository/danieleteti-delphi-orm.md) (175 ⭐) — Delphi ORM (DORM for short) is a powerful ORM for Delphi. It is quite robust and tested because used since 2010 in production for many business critical systems.
- [go-pg/pg](https://awesome-repositories.com/repository/go-pg-pg.md) (5,785 ⭐) — pg is a PostgreSQL object-relational mapper (ORM) for Go that maps Go structs to database tables and provides a fluent query builder for constructing SQL statements programmatically. At its core, it automatically generates CREATE TABLE statements from Go struct definitions using struct tags and naming conventions, and builds queries through method chaining with placeholder-based parameter binding to prevent SQL injection.

The library distinguishes itself through relation-aware join generation that automatically constructs JOIN clauses for has-one, has-many, many-to-many, and polymorphic assoc
- [aarondl/sqlboiler](https://awesome-repositories.com/repository/aarondl-sqlboiler.md) (6,989 ⭐) — sqlboiler is a database-first ORM generator for Go that analyzes an existing database schema to produce strongly typed structures and query helpers. It functions as a schema-driven code generator, transforming database tables and relationships into executable Go source code.

The project distinguishes itself through a type-safe query builder that uses chainable modifiers to construct SQL statements, eliminating the need for raw string concatenation. It utilizes customizable text templates to generate source code, allowing for the aliasing of schema entities and the creation of custom templates
- [evershopcommerce/evershop](https://awesome-repositories.com/repository/evershopcommerce-evershop.md) (10,141 ⭐) — EverShop is a TypeScript-first, modular e-commerce platform built with GraphQL and React. It provides a full-featured online store system for managing products, orders, customers, and site content through a React-based administrative interface, with a GraphQL API layer that serves both the admin panel and storefront.

The platform is designed around a module-based extension architecture, where core functionality is split into independent modules that can be added, removed, or overridden without modifying the core codebase. Storefront appearance and behavior are controlled through a theme syste
- [seaql/sea-orm](https://awesome-repositories.com/repository/seaql-sea-orm.md) (9,410 ⭐) — Sea-ORM is an asynchronous SQL object-relational mapper and database toolkit for mapping relational tables to strongly typed objects. It provides a relational database mapper for performing CRUD operations across MySQL, PostgreSQL, and SQLite, and includes a programmatic dynamic query builder for constructing complex SQL statements.

The project distinguishes itself by providing a GraphQL schema generator that transforms database entities into typed schemas with built-in pagination and filters. It also features a dedicated database migration tool for defining and applying versioned schema chan
- [kysely-org/kysely](https://awesome-repositories.com/repository/kysely-org-kysely.md) (13,969 ⭐) — Kysely is a TypeScript SQL query builder that provides a type-safe interface for constructing and executing database queries. It functions as a database layer that ensures schema compliance and prevents runtime errors by using a fluent interface and a programmable way to build complex SQL statements.

The project features a type-safe database layer capable of inferring return types and aliases from SQL selections and joins. It also includes a SQL migration manager to track and apply schema changes across different environments to keep database versions synchronized.

The toolkit covers relatio
- [emresandikci/pocketbase-query](https://awesome-repositories.com/repository/emresandikci-pocketbase-query.md) (59 ⭐) — @emresandikci/pocketbase-query is a TypeScript-based query builder designed to generate complex filter queries for PocketBase. It allows for easy construction of queries using various operators while maintaining a fluent and chainable API.
- [milvus-io/milvus](https://awesome-repositories.com/repository/milvus-io-milvus.md) (44,804 ⭐) — Milvus is a specialized vector database engine designed for the indexing, management, and high-speed similarity retrieval of high-dimensional vector embeddings. It functions as a similarity search engine capable of identifying nearest neighbors within large-scale vector spaces, supporting the storage and retrieval of billions of data points while maintaining consistent performance.

The system utilizes a distributed architecture that decouples storage, query, and coordination into independent services, allowing for horizontal scaling across clusters. It employs a global indexing mechanism that
- [ent/ent](https://awesome-repositories.com/repository/ent-ent.md) (17,110 ⭐) — Ent is a statically typed entity framework for Go that models database structures as a graph of nodes and edges. It functions as a code generation engine that transforms schema definitions into type-safe database clients, query builders, and migration scripts. By representing data as interconnected entities, the framework enables intuitive traversal of complex relationships and ensures that database interactions remain consistent with the application model at compile time.

The framework distinguishes itself through its graph-based approach to data modeling and its reliance on compile-time cod
- [laravel/framework](https://awesome-repositories.com/repository/laravel-framework.md) (34,774 ⭐) — This project is a full-stack web framework that provides a comprehensive environment for building server-side applications. It utilizes a model-view-controller architecture to separate application logic into distinct layers for data management, user interface presentation, and request handling. The platform manages the entire request-response lifecycle, including security, session handling, and background task processing, while using an object-relational mapping layer to translate database records into programmable objects.

The framework distinguishes itself through a central service containe
- [tomnicholas/python-for-scientists](https://awesome-repositories.com/repository/tomnicholas-python-for-scientists.md) (359 ⭐) — A list of recommended Python libraries, and resources, intended for scientific Python users.
- [tommikaikkonen/redux-orm](https://awesome-repositories.com/repository/tommikaikkonen-redux-orm.md) (2,932 ⭐) — ``bash npm install redux-orm --save ``
- [prisma/prisma1](https://awesome-repositories.com/repository/prisma-prisma1.md) (16,393 ⭐) — Prisma1 is a TypeScript object-relational mapper and type-safe database client designed for interacting with relational databases. It functions as a system for declarative schema modeling, where database structures are defined in a single schema file that automatically synchronizes with the underlying database.

The project provides a type-safe query builder that generates a custom client to ensure database queries match defined schema types at compile time. It also includes a database GUI administrator, providing a visual web interface for browsing, editing, and managing relational database r
- [fastapi/fastapi](https://awesome-repositories.com/repository/fastapi-fastapi.md) (99,260 ⭐) — FastAPI is a web framework for building APIs with Python. It leverages standard language type hints to provide automatic data validation, request parsing, and interactive API documentation generation. The framework supports asynchronous request handling and manages execution contexts to prevent blocking the main event loop.

The project includes a dependency injection system that allows for the resolution and injection of reusable components into request handlers. This system supports request-scoped caching, lifecycle management, and integration with security mechanisms like OAuth2 and JSON We
- [greenrobot/greendao](https://awesome-repositories.com/repository/greenrobot-greendao.md) (12,590 ⭐) — greenDAO is an object-relational mapping library for Android that maps Java objects to SQLite databases. It provides infrastructure for high-performance data persistence by translating data objects into database records and vice versa.

The library implements a type-safe query builder for retrieving records across multiple entities using joins and relationship chaining. It also includes a security layer that provides full-disk encryption for the SQLite database to prevent unauthorized access to stored information.

The system utilizes compile-time code generation to create mapping classes, avo
- [base16-builder/base16-builder](https://awesome-repositories.com/repository/base16-builder-base16-builder.md) (454 ⭐) — :hammer: Base16 Builder is a nimble command-line tool that generates themes for your favourite programs.
