sqlalchemy-trino
Trino dialect for SQLAlchemy
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-trinouv
uv add sqlalchemy-trinopoetry
poetry add sqlalchemy-trinoInstalling 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
Tags
More Database packages
psycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
ydbYDB Python SDK is the official client library…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
sqlparsesqlparse tokenizes SQL text into a tree of…
permissive · top 1,000 on PyPI
dbt-adaptersProvides base adapter protocols and shared…
permissive · top 1,000 on PyPI
databricks-sqlalchemyProvides a SQLAlchemy 2.0 dialect that bridges…
permissive · top 1,000 on PyPI
trinoPython client library for Trino, a distributed…
permissive · top 1,000 on PyPI
duckdb-engineA SQLAlchemy driver that enables you to use…
permissive · top 5,000 on PyPI
pybigquerySQLAlchemy dialect for BigQuery that enables…
permissive · top 15,000 on PyPI
sqlalchemy-bigquerySQLAlchemy dialect that enables you to use…
permissive · top 1,000 on PyPI
sqlalchemy-databricksProvides a SQLAlchemy dialect that connects to…
permissive · top 15,000 on PyPI
sqlalchemy-jdbcapiSQLAlchemy dialect for JDBC and ODBC database…
permissive · top 15,000 on PyPI
PyHivePyHive provides DB-API and SQLAlchemy…
permissive · top 5,000 on PyPI
sqlalchemy-solrProvides a SQLAlchemy dialect that allows you…
permissive · top 15,000 on PyPI
snowflake-sqlalchemySnowflake SQLAlchemy is a SQLAlchemy dialect…
permissive · top 1,000 on PyPI