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

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

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

sqlalchemy/sqlalchemy

0
View on GitHub↗
11,612 星标·1,639 分支·Python·mit·40 次浏览www.sqlalchemy.org↗

Sqlalchemy

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 unified interface for database communication by abstracting vendor-specific behaviors into modular drivers, while simultaneously supporting non-blocking concurrency through an asynchronous execution bridge that integrates seamlessly with modern event-loop-based application environments.

Beyond its core mapping and query capabilities, the library includes extensive infrastructure for schema management, including automated generation and runtime reflection of database structures. It also offers robust observability features, such as lifecycle event hooking and connection pool monitoring, which allow developers to intercept operations for logging, caching, or cross-cutting logic.

The toolkit supports a wide range of advanced database patterns, including complex inheritance mapping, horizontal data sharding, and fine-grained transaction isolation control. It is designed to be highly extensible, allowing for custom data type definitions, dialect-specific SQL constructs, and specialized function registration to meet diverse application requirements.

Features

  • Object-Relational Mapping - Maps Python classes to relational database tables using declarative or imperative styles for object-oriented data persistence.
  • Asynchronous SQL Toolkits - Provides a comprehensive library for interacting with relational databases using object-oriented patterns and a powerful SQL expression language.
  • SQL Query Builders - Provides a programmatic interface for constructing complex, dialect-agnostic SQL queries using composable objects.
  • Object-Relational Mappers - Maps database tables to Python classes, enabling developers to manage data persistence through object state and relationships.
  • Common Table Expressions - Constructs recursive or non-recursive temporary result sets to organize complex queries into modular, reusable components.
  • Data Modification Interfaces - Performs insert, update, and delete operations on database records using a unified interface that abstracts underlying SQL syntax.
  • Database Schema Constraints - Enforces data integrity rules such as primary keys, foreign keys, unique values, and custom check expressions.
  • Database Transaction Management - Manages atomic units of work across multiple operations, supporting savepoints, two-phase commits, and configurable isolation levels.
  • Object-Relational Mapping Associations - Links multiple related entities or subqueries using relationship-aware syntax to retrieve associated data across relational boundaries.
  • State Change Tracking - Monitors modifications to object attributes and collections to ensure that changes are detected and persisted correctly.
  • Schema Generation Utilities - Automates the generation and application of database schema definitions directly from object models to initialize or update structures.
  • Asynchronous Session Managers - Provides a stateful session interface for database operations that supports awaitable execution and transaction management within asynchronous workflows.
  • Custom SQL Function Registrars - Provides a registration interface for custom or vendor-specific SQL functions to ensure consistent usage within the query builder.
  • Database Model Mixins - SQLAlchemy shares common columns, constraints, and behaviors across multiple models using mixins and abstract base classes.
  • State Persistence - Tracks object state changes within a session to coordinate atomic database transactions and minimize redundant write operations.
  • Hybrid Attributes - Creates class attributes that behave as both properties and SQL expressions to allow consistent logic across application code and queries.
  • Database Clients - Database toolkit for Python.
  • Database ORMs - Listed in the “Database ORMs” section of the Awesome Python awesome list.
  • Database Tools - SQL toolkit and ORM for Python.
  • Object Relational Mappers - SQL toolkit and object relational mapper.
  • Persistence Frameworks - Comprehensive SQL toolkit and ORM for Python.
  • Asynchronous Database Command Execution - Performs database operations using non-blocking input and output to handle multiple concurrent requests without stalling the application event loop.
  • Asynchronous Database Drivers - Provides a unified layer for performing non-blocking database operations and managing transactions within asynchronous Python environments.
  • Bulk Data Operations - Performs high-performance insert, update, and delete operations on multiple records simultaneously while maintaining mapping consistency.
  • Column Expression Modifiers - Allows refining query results by adding ordering, labeling, or filtering clauses to column expressions during statement construction.
  • Data Sharding - Routes database queries and operations to specific physical nodes based on defined partitioning logic to scale storage capacity.
  • Database Driver Abstractions - Provides a unified interface for database communication by abstracting vendor-specific behaviors into modular driver implementations.
  • Table Metadata Inspection - Retrieves metadata about database structures such as tables and columns, including support for asynchronous inspection.
  • Inheritance Mappings - Supports single-table, joined-table, and concrete-table inheritance strategies to represent object-oriented hierarchies in relational databases.
  • Relation Loading Strategies - Controls how and when related data is fetched, including options for eager loading, lazy loading, and write-only access patterns.
  • Database Value Generation - Configures columns to use database-native identity or sequence objects to automatically generate unique identifiers.
  • Database Schema Reflection - SQLAlchemy allows modifying column definitions or properties during the process of reading database metadata for table reflection.
  • Column Definitions - Assigns scalar values, functions, or SQL expressions to columns to automatically populate data during insert or update operations.
  • Data Type Mappings - Provides native mapping for database-specific types including JSON, arrays, and range types for advanced data modeling.
  • Data Upsert Operations - Performs insert-or-update logic using database-native duplicate key update syntax to handle conflicting records.
  • Database Connection Managers - Maintains and reuses persistent database connections to optimize performance and resource usage in concurrent applications.
  • Connection Pool Managers - Maintains a pool of persistent database connections to optimize performance and ensure stable resource usage.
  • Schema Modification - Provides programmatic constructs for creating and modifying standard SQL schema objects like tables.
  • Database Relationship Mappings - Models tree-like structures using adjacency lists, materialized paths, or nested sets to persist and query parent-child relationships.
  • Eager Loading Strategies - Configures how subclasses are retrieved and loaded when querying base classes, including eager loading and subtype filtering.
  • Expression-Based Data Querying - Translates high-level programming objects into vendor-specific SQL strings by traversing a tree of composable expression constructs.
  • Polymorphic Associations - Associates multiple parent types with a single child object using polymorphic discriminators or flexible foreign key patterns.
  • Compilation Caches - Stores and reuses compiled SQL statement strings to reduce computational overhead and speed up query execution.
  • SQL Dialect Adapters - Provides specialized compilation rules for different database backends to ensure custom SQL constructs render correctly across engines.
  • Transaction Control Systems - Configures transaction isolation levels and characteristics to control data consistency and concurrency behavior.
  • Table Function Invocation - Maps database functions that return sets of rows directly to queryable table aliases within SQL statements.
  • Value Objects - Encapsulates data and associated comparison logic into objects that behave consistently across Python and SQL contexts.
  • Custom Data Types - Extends the type system by creating user-defined types to handle specialized data serialization, validation, or database-specific operator logic.
  • Query Result Caching - Stores and retrieves query results or lazy-loaded attributes in external backends to reduce redundant database load.
  • Metadata-Driven Schema Mappers - Inspects existing database structures at runtime to automatically generate application-level models and mapping configurations.
  • Database Alias Management - Creates named aliases for tables or subqueries to manage namespace conflicts and simplify complex query structures.
  • Database Lifecycle Hooks - Allows custom logic to be injected into the query and persistence pipeline by triggering callbacks during specific database operations.
  • Partitioning Implementations - Declares partitioned tables using strategies like RANGE, LIST, or HASH to distribute data across multiple physical storage segments.
  • Object-Relational Mapping Utilities - Propagates state changes like deletions, merges, and refreshes automatically across related objects based on defined relationship rules.
  • Attribute Proxies - Exposes attributes from related objects or collections directly on a parent object to simplify data access.
  • Query Execution Triggers - Provides hooks into the query lifecycle to apply global filters, custom criteria, or caching logic automatically.
  • Result Streaming APIs - Supports incremental data retrieval using server-side cursors to process large result sets efficiently without exhausting application memory.
  • Database Indexes - Speeds up data retrieval by defining single-column, composite, or functional indexes that allow the database to locate specific records.
  • Dynamic Invocation Interfaces - Enables flexible SQL generation by invoking database functions through dynamic namespaces with type-safe return values.
  • Logical Operations - Combines multiple filter conditions using AND, OR, and NOT logic to construct complex database query criteria.
  • Relational Value Comparisons - Evaluates relationships between database columns and values using standard comparison operators like equality and range checks.
  • Entity Audit Logs - Maintains historical records of object changes by automatically creating audit logs or using temporal row versioning.
  • Asynchronous Execution - Enables non-blocking database operations by wrapping them within an event loop for asynchronous application environments.

Star 历史

sqlalchemy/sqlalchemy 的 Star 历史图表sqlalchemy/sqlalchemy 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

Sqlalchemy 的开源替代方案

相似的开源项目,按与 Sqlalchemy 的功能重合度排序。
  • dotnet/efcoredotnet 的头像

    dotnet/efcore

    14,587在 GitHub 上查看↗

    Entity Framework Core is an object-relational mapper that enables developers to interact with database systems using strongly-typed code. It serves as a comprehensive data access framework, providing a unified interface for mapping application objects to relational and non-relational database schemas while managing the lifecycle of data operations through a central context. The project distinguishes itself through a provider-based architecture that decouples core data access logic from specific database engines, allowing for consistent interaction across diverse storage systems. It features a

    C#aspnet-productc-sharpdatabase
    在 GitHub 上查看↗14,587
  • coleifer/peeweecoleifer 的头像

    coleifer/peewee

    11,971在 GitHub 上查看↗

    Peewee is a SQL object-relational mapper and query builder that provides an object-oriented interface for mapping application classes to relational database tables. It functions as a relational database toolkit for managing schemas, executing migrations, and handling complex table relationships. The project distinguishes itself by providing an asyncio database driver for non-blocking database operations, ensuring event loop responsiveness. It also supports semi-structured data storage, allowing the storage and querying of flexible JSON documents within traditional relational database systems.

    Pythonasynciodankfastapi
    在 GitHub 上查看↗11,971
  • dapperlib/dapperDapperLib 的头像

    DapperLib/Dapper

    18,331在 GitHub 上查看↗

    Dapper is a lightweight object-relational mapper for .NET that functions as a high-performance data access library. It operates by extending standard database connection interfaces, allowing developers to execute raw SQL queries while automating the mapping of database results to strongly-typed objects. The library distinguishes itself through its use of runtime code generation, which creates high-performance instructions to map database rows to object properties with minimal overhead. It provides flexible data retrieval options, supporting both memory-buffered loading for speed and row-by-ro

    C#ado-netdappersql
    在 GitHub 上查看↗18,331
  • typeorm/typeormtypeorm 的头像

    typeorm/typeorm

    36,540在 GitHub 上查看↗

    TypeORM is an object-relational mapper for TypeScript and JavaScript that bridges the gap between object-oriented application code and relational database tables. It provides a comprehensive data persistence layer that allows developers to define database entities using class decorators or configuration objects, enabling seamless interaction with data through object-oriented patterns. The project distinguishes itself through a flexible architecture that supports both the data mapper and repository patterns, alongside a fluent query builder that translates high-level method calls into platform

    TypeScriptactive-recordcockroachdbdata-mapper
    在 GitHub 上查看↗36,540
查看 Sqlalchemy 的所有 30 个替代方案→

常见问题解答

sqlalchemy/sqlalchemy 是做什么的?

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.

sqlalchemy/sqlalchemy 的主要功能有哪些?

sqlalchemy/sqlalchemy 的主要功能包括:Object-Relational Mapping, Asynchronous SQL Toolkits, SQL Query Builders, Object-Relational Mappers, Common Table Expressions, Data Modification Interfaces, Database Schema Constraints, Database Transaction Management。

sqlalchemy/sqlalchemy 有哪些开源替代品?

sqlalchemy/sqlalchemy 的开源替代品包括: dotnet/efcore — Entity Framework Core is an object-relational mapper that enables developers to interact with database systems using… coleifer/peewee — Peewee is a SQL object-relational mapper and query builder that provides an object-oriented interface for mapping… dapperlib/dapper — Dapper is a lightweight object-relational mapper for .NET that functions as a high-performance data access library. It… typeorm/typeorm — TypeORM is an object-relational mapper for TypeScript and JavaScript that bridges the gap between object-oriented… vincit/objection.js — Objection.js is an object-relational mapper for Node.js that maps SQL database tables to classes and rows to model… go-gorm/gorm — GORM is a developer-focused object-relational mapping library for Go that provides a comprehensive data persistence…