awesome-repositories.com
博客
MCP
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目MCP 服务器关于排名机制媒体报道
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·

类型安全的 Python ORM 与查询构建器

排名更新于 2026年6月30日

For Python 的类型安全 ORM, the strongest matches are tortoise/tortoise-orm (Tortoise ORM is an async ORM for Python with), fastapi/sqlmodel (SQLModel is a type-safe Python ORM and query builder) and sqlalchemy/sqlalchemy (SQLAlchemy is the leading Python ORM and query builder). piccolo-orm/piccolo and ormar-orm/ormar round out the shortlist. Each is ranked by relevance to your query, popularity and recent activity.

探索为数据库交互和查询提供强大类型检查及自动补全功能的 Python 库。

类型安全的 Python ORM 与查询构建器

用 AI 发现最棒的仓库。我们将通过 AI 为您搜索最匹配的仓库。
  • tortoise/tortoise-ormtortoise 的头像

    tortoise/tortoise-orm

    5,582在 GitHub 上查看↗

    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

    Tortoise ORM is an async ORM for Python with a chainable queryset API (query builder), typed model fields, migration support, and multiple database backends, directly matching the request for a type-safe ORM with query builder; it covers most features but does not explicitly provide raw SQL with type validation.

    PythonAsync Python ORMs with RelationsAsync-Await ORM CoresORM Data Models
    在 GitHub 上查看↗5,582
  • fastapi/sqlmodelfastapi 的头像

    fastapi/sqlmodel

    18,137在 GitHub 上查看↗

    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-

    SQLModel is a type-safe Python ORM and query builder that uses Pydantic for validation and type hints, supporting async operations, migrations, and multiple databases with full query-building capabilities, making it an excellent fit for this search.

    PythonType-Safe Query Builders
    在 GitHub 上查看↗18,137
  • sqlalchemy/sqlalchemysqlalchemy 的头像

    sqlalchemy/sqlalchemy

    11,612在 GitHub 上查看↗

    SQLAlchemy is a comprehensive Python SQL toolkit and object-relational mapper that provides a full suite of tools for interacting with relational databases. It serves as a foundational layer for database connectivity, offering both a high-level object-oriented interface for data persistence and a programmatic SQL expression language for constructing complex, dialect-agnostic queries. The project distinguishes itself through its sophisticated unit of work persistence, which coordinates atomic transactions and tracks object state changes to minimize redundant database operations. It provides a

    SQLAlchemy is the leading Python ORM and query builder, now with first-class type-hinted schema definitions (Mapped, mapped_column) in version 2.0, async support, comprehensive relationship handling, and broad database coverage — squarely meeting your search for a type-safe ORM and query builder.

    PythonAsynchronous SQL ToolkitsObject-Relational MappingSQL Query Builders
    在 GitHub 上查看↗11,612
  • piccolo-orm/piccolopiccolo-orm 的头像

    piccolo-orm/piccolo

    1,913在 GitHub 上查看↗

    Piccolo is an async Python ORM with a built-in type-safe query builder that uses type hints, directly fitting the search's core requirement; it supports async, migrations, relationships, and PostgreSQL/SQLite, though it may not cover MySQL or raw SQL type validation as fully.

    PythonDatabase ClientsDatabase DriversDatabase ORMs and ODMs
    在 GitHub 上查看↗1,913
  • ormar-orm/ormarormar-orm 的头像

    ormar-orm/ormar

    1,805在 GitHub 上查看↗

    Ormar is an asynchronous object-relational mapper for Python that integrates database persistence with data validation. It functions as a bridge between relational database management and application-level data structures, allowing developers to define database schemas that serve simultaneously as validation models. The project distinguishes itself by using validation classes to enforce schema integrity, ensuring that all persisted records conform to defined types and structures. It supports complex relational associations, including one-to-many and many-to-many relationships, and provides ev

    ormar is an async Python ORM built on Pydantic for automatic type validation and alignment with FastAPI, covering the core type-safe ORM and query-building needs with migration support via Alembic and async database access.

    PythonAsync Python ORMs with Relations
    在 GitHub 上查看↗1,805

Related searches

  • 适用于 TypeScript 应用的类型安全 ORM
  • 优先支持 TypeScript 的 SQL 数据库 ORM
  • Go 语言 ORM 与查询构建器
  • an object relational mapper for Rust
  • an object relational mapping library for Kotlin
  • Rust 的类型安全 SQL 查询工具
  • an object relational mapping library for Dart
  • 基于 Python 类型提示的数据验证库