Download SQLAlchemy – Python SQL Toolkit and ORM Library

SQLAlchemy is the most popular Python SQL toolkit and ORM, providing both high-level object-relational mapping and low-level SQL expression language for all major databases.
Download
  • Publisher:
  • Version:
    2.044
  • License:
  • File Size:
    5,5 MB
  • Downloads:
    3008
  • Updated:
    17/10/2025
  • Requirements:
    Windows7,8,10,11

SQLAlchemy is the most popular and powerful SQL toolkit and Object-Relational Mapper (ORM) for Python. It provides a complete set of tools for working with relational databases — from a low-level SQL expression language for fine-grained query control to a high-level ORM that lets you work with database tables as Python classes and objects.

With SQLAlchemy, you can connect to virtually any relational database including PostgreSQL, MySQL, SQLite, Oracle, and Microsoft SQL Server using a unified API. The ORM layer maps your Python classes to database tables and manages sessions, relationships, lazy loading, and transactions automatically, dramatically reducing the boilerplate code required for database operations.

SQLAlchemy is used by major web frameworks like Flask (via Flask-SQLAlchemy) and is a core dependency in many production Python applications. Its combination of power, flexibility, and Pythonic design makes it the go-to database toolkit for Python developers.

Key Features

  • Powerful ORM that maps Python classes to database tables with relationship support
  • SQL Expression Language for writing precise, database-agnostic SQL queries in Python
  • Supports PostgreSQL, MySQL, SQLite, Oracle, MSSQL, and other databases via dialects
  • Session management with automatic transaction handling and unit-of-work pattern
  • Relationship loading strategies: lazy, eager, and joined loading for optimal performance
  • Schema definition and migration support via Alembic integration
  • Async support (asyncio) for high-performance async database applications
SQLAlchemy ORM query and database connection example SQLAlchemy model definition and session management

How to Install

  1. Click the download button below or install via pip: pip install sqlalchemy
  2. Install the appropriate database driver (e.g., pip install psycopg2 for PostgreSQL).
  3. Create an engine: engine = create_engine("postgresql://user:pass@localhost/dbname")
  4. Define your models by subclassing Base = declarative_base() and mapping columns.
  5. Create a session and start querying: session.query(MyModel).filter(...).all()

Other Versions