skillfed

sqlalchemy-trino

Trino dialect for SQLAlchemy

sqlalchemy-trino v0.5.0 606.9K downloads/30d#5,787 on PyPI25
Permissive license Apache 2.0 Abandoned released

What it is and what it does

sqlalchemy-trino is a SQLAlchemy dialect that allows you to connect to and query Trino databases using SQLAlchemy's ORM and SQL expression language. It translates SQLAlchemy operations into Trino-compatible SQL and handles connection management, authentication (including JWT and user impersonation), and result retrieval. The package depends only on the trino runtime library.

The package is now deprecated and archived. Its code was donated and merged into the upstream trino project, so active development has ceased. If you are starting a new project, the upstream project is the recommended source for Trino dialect support rather than this standalone package.

Use it for:

  • Build a Python application that queries Trino using SQLAlchemy ORM models instead of raw SQL.
  • Migrate data from Trino to pandas DataFrames using SQLAlchemy's read_sql interface.
  • Write Trino data to tables from pandas DataFrames using SQLAlchemy's to_sql method.
  • Authenticate to Trino with JWT tokens or user impersonation via SQLAlchemy connection strings.
  • Use SQLAlchemy's query builder to construct dynamic Trino queries without writing raw SQL.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a SQLAlchemy dialect for connecting to and querying Trino databases, enabling ORM and SQL expression support for Trino as a backend.

No. The package is abandoned (last release May 2022, archived repository) and its functionality has been merged into the upstream trino project. New projects should use the trino package's built-in SQLAlchemy support instead. Only consider installing if you are maintaining legacy code that already depends on it and cannot migrate to the upstream solution.

Install

sqlalchemy-trino on PyPI

pip

pip install sqlalchemy-trino

uv

uv add sqlalchemy-trino

poetry

poetry add sqlalchemy-trino

Installing sqlalchemy-trino

Before you install

Installation is straightforward with low friction, but the package is abandoned as of May 2022 and no longer maintained—its functionality has been merged into the upstream trino project.

License in practice

Licensed under Apache 2.0 (permissive), so you may use, modify, and distribute it freely with minimal restrictions.

Quickstart

from sqlalchemy.engine import create_engine
from trino.auth import JWTAuthentication

engine = create_engine(
  'trino://@:/',
  connect_args={'auth': JWTAuthentication('a-jwt-token')},
)

Requires Trino version 352 or higher; when using username and password, connection is automatically over TLS.

Verify before relying

  • Whether the upstream trino package now provides equivalent SQLAlchemy dialect support that should be preferred.
  • Current compatibility with modern SQLAlchemy versions and Trino releases beyond version 352.

Package facts

License Apache 2.0 (permissive)
Python support supports the current Python release (>=3.7)
Install friction low — pure-Python wheel
Runtime dependencies 1 — trino
Maintenance abandoned — 1,562 days since the last release
Last repo commit (repository archived)
First released
Downloads 606,921/month — #5,787 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: sqlalchemy_trino-0.5.0-py3-none-any.whl

Keywords: sqlalchemy, trino

Intended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: DatabaseTopic :: Database :: Front-Ends

Tags

sqlalchemy trino dialecttrino database connectionsqlalchemy trino drivertrino sql queriestrino orm integration
deprecatedarchived

More Database packages