trino
Client for the Trino distributed SQL Engine
Decision gist · record as of 2026-08-14
Yes. Trino is a mature, actively maintained client with no known vulnerabilities, low install friction, and permissive licensing. Install it if you need to query a Trino cluster from Python—it is the official client and supports both simple DBAPI workflows and complex SQLAlchemy integrations. The only condition is that your environment runs Python >= 3.9 and has network access to your Trino server.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >= 3.9; Trino server >= 351 for SQLAlchemy support.
- Low friction install with seven runtime dependencies (lz4, orjson, python-dateutil, pytz, requests, tzlocal, zstandard).
- Package is actively maintained with recent releases and no known vulnerabilities.
License · maintenance · safety
Apache 2.0 (permissive) — Apache 2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most production environments.
last release 2026-06-29 (46 days) · last repo commit 2026-07-29 · 433 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 23,592,785 downloads/mo, #937 on PyPI
Alternatives
Verify before relying
pip install trino
from trino.dbapi import connect
conn = connect(host="localhost", port=8080, user="user", catalog="system", schema="")
cur = conn.cursor()
cur.execute("SELECT * FROM system.runtime.nodes")
rows = cur.fetchall()- Performance characteristics and query latency for typical workloads.
- Completeness of Trino feature coverage (e.g., all authentication types, catalog connectors).
- Compatibility matrix with specific Trino server versions beyond the stated >= 351 for SQLAlchemy.
What it is and what it does
Trino is a Python client for querying Trino, a distributed SQL engine designed for interactive and batch big data processing. It provides three interfaces: a low-level client, a DBAPI 2.0 implementation (the standard Python database API), and a SQLAlchemy adapter for ORM and schema-aware queries. The package handles connection management, query execution, result fetching, and multiple authentication mechanisms (basic, JWT, OAuth2, certificate, Kerberos) to connect securely to Trino clusters.
The DBAPI interface is the most direct way to execute SQL queries and retrieve results row-by-row or in batches. The SQLAlchemy adapter integrates with the broader Python ORM ecosystem, allowing schema introspection and programmatic query construction. Both interfaces abstract away HTTP communication details and handle serialization/deserialization of data types using dependencies like orjson, python-dateutil, and pytz for efficient JSON and timezone handling.
Use it for
- Execute ad-hoc SQL queries against a Trino cluster from Python scripts or notebooks.
- Build data pipelines that read from multiple catalogs and schemas in a distributed Trino environment.
- Integrate Trino queries into SQLAlchemy-based ORM applications for schema-driven data access.
- Automate cluster monitoring by querying system.runtime tables for node and query status.
- Authenticate to Trino using enterprise security mechanisms (OAuth2, Kerberos, certificates).
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Trino is a mature, actively maintained client with no known vulnerabilities, low install friction, and permissive licensing. Install it if you need to query a Trino cluster from Python—it is the official client and supports both simple DBAPI workflows and complex SQLAlchemy integrations. The only condition is that your environment runs Python >= 3.9 and has network access to your Trino server.
Install
trino on PyPI
Before you install
Low friction install with seven runtime dependencies (lz4, orjson, python-dateutil, pytz, requests, tzlocal, zstandard). Package is actively maintained with recent releases and no known vulnerabilities.
Requires Python >= 3.9; Trino server >= 351 for SQLAlchemy support.
License in practice
Apache 2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most production environments.
Quickstart
pip install trino
from trino.dbapi import connect
conn = connect(host="localhost", port=8080, user="user", catalog="system", schema="")
cur = conn.cursor()
cur.execute("SELECT * FROM system.runtime.nodes")
rows = cur.fetchall()
Verify before relying
- Performance characteristics and query latency for typical workloads.
- Completeness of Trino feature coverage (e.g., all authentication types, catalog connectors).
- Compatibility matrix with specific Trino server versions beyond the stated >= 351 for SQLAlchemy.
Package facts
| License | Apache 2.0 permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 7 packageslz4orjsonpython-dateutilpytzrequeststzlocalzstandard |
| Maintenance | Actively maintained 46 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 23,592,785 / month, #937 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Database :: Front-Ends |
Evidence: trino-0.338.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “trino sql client python”
- trinoPython client library for Trino, a distributed SQL engine, providing…
- apache-airflow-providers-trinoIntegrates Apache Airflow with Trino, enabling Airflow DAGs to…
- PyHivePyHive provides DB-API and SQLAlchemy interfaces to query Presto,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Front-Ends packages
SQLAlchemy is a Python SQL toolkit and Object Relational Mapper (ORM) that provides both a high-level ORM layer for declarative object persistence and a Core SQL construction system for direct database abstraction and query building.
psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.
Alembic generates and manages database schema migrations for SQLAlchemy applications, handling version control of database structure changes with support for upgrades, downgrades, and auto-generation from model changes.
Install it if you use SQLAlchemy and need to version-control schema changes; skip it only if you manage migrations manually or use a different ORM entirely.
A Python client library for connecting to and querying Weaviate, a vector database that enables semantic search and AI-powered data retrieval.
A Python client library that connects to Databricks clusters and SQL warehouses using a Thrift-based protocol, conforming to the Python DB API 2.0 specification and supporting Arrow-based data exchange.
Install it if you need to query Databricks clusters or SQL warehouses from Python.
Psycopg 3 is a PostgreSQL database adapter for Python that enables applications to connect to, query, and manage PostgreSQL databases using Python code.
Install it if you need to connect Python to PostgreSQL.
See also presto-python-client · sqlalchemy-trino · singlestoredb · PyHive · databricks-dbapi · pydoris-custom · dbt-trino · pydoris · sqlalchemy-databricks · elasticsearch-dbapi