presto-python-client
Client for the Presto distributed SQL Engine
What it is and what it does
This is a Python client for Presto, a distributed SQL query engine. It implements the Python DBAPI 2.0 interface, allowing you to connect to a Presto cluster and execute SQL queries using standard cursor methods like execute() and fetchall(). You provide connection details (host, port, user, catalog, schema) and optional authentication (basic, Kerberos, or OAuth), then interact with the cluster through familiar database cursor operations.
The package handles HTTP communication with the Presto coordinator and supports transaction control via isolation levels. It works across multiple Python versions and operating systems, including CPython and PyPy. Common use cases include ad-hoc analytics queries, data pipeline integration, and programmatic access to Presto clusters from Python applications.
Use it for:
- Execute SQL queries against a Presto cluster from a Python script without writing raw HTTP requests.
- Integrate Presto queries into data pipelines or ETL workflows that require programmatic SQL execution.
- Connect to LDAP-configured or OAuth-enabled Presto clusters using authentication classes.
- Retrieve query results in batches using fetchone(), fetchmany(), or fetchall() for memory-efficient processing.
- Run transactional workloads by setting isolation_level to REPEATABLE_READ or other non-autocommit modes.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a Python DBAPI-compatible client to query Presto, a distributed SQL engine, executing SQL and retrieving results.
Yes, if you need to query Presto from Python. The package is actively maintained, has low install friction, carries no known vulnerabilities, and uses a permissive Apache 2.0 license. However, note the release gap since 2023-09-07—verify compatibility with your Presto version before adopting in new projects.
Install
presto-python-client on PyPI
pip
pip install presto-python-clientuv
uv add presto-python-clientpoetry
poetry add presto-python-clientInstalling presto-python-client
Before you install
Low install friction with a pure-wheel distribution. Actively maintained as of 2026-03-18, though the last release was in 2023-09-07. Depends on common, stable libraries (click, requests, six).
License in practice
Licensed under Apache 2.0 (permissive), allowing commercial and private use with minimal restrictions.
Quickstart
pip install presto-python-client
import click
import requests
conn = connect(
host='localhost',
port=8080,
user='the-user',
catalog='the-catalog',
schema='the-schema',
)
cur = conn.cursor()
cur.execute('SELECT * FROM system.runtime.nodes')
rows = cur.fetchall()
Verify before relying
- Whether the package works with modern Presto/Trino versions given the release gap since 2023-09-07.
- Current compatibility with Python 3.8 and 3.9 versions beyond those explicitly listed in early classifiers.
- Whether Kerberos and OAuth authentication features work reliably in production environments.
Package facts
| License | Apache 2.0 (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — click, requests, six, ipaddress, typing |
| Maintenance | actively maintained — 1,072 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 4,918,934/month — #2,199 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: presto_python_client-0.8.4-py3-none-any.whl
Tags
More Front-Ends packages
SQLAlchemy is a Python SQL toolkit and Object…
permissive · top 100 on PyPI
psycopg2-binarypsycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
alembicAlembic generates and manages database schema…
permissive · top 1,000 on PyPI
weaviate-clientA Python client library for connecting to and…
permissive · top 1,000 on PyPI
databricks-sql-connectorA Python client library that connects to…
permissive · top 1,000 on PyPI
psycopgPsycopg 3 is a PostgreSQL database adapter for…
copyleft · top 1,000 on PyPI
presto-types-parserParses Presto SQL type annotations from rows…
permissive · top 15,000 on PyPI
singlestoredbProvides a DB-API 2.0 compatible Python…
permissive · top 15,000 on PyPI
trinoPython client library for Trino, a distributed…
permissive · top 1,000 on PyPI
apache-airflow-providers-prestoIntegrates Presto query execution into Apache…
permissive · top 15,000 on PyPI
salesforce-cdp-connectorConnects Python to Salesforce Data Cloud to…
permissive · top 15,000 on PyPI
elasticsearch-dbapiProvides DBAPI (PEP-249) and SQLAlchemy dialect…
permissive · top 5,000 on PyPI
python-tdsPure Python DBAPI driver for MSSQL that…
permissive · top 5,000 on PyPI
qds-sdkA Python SDK for authenticating with and…
permissive · top 15,000 on PyPI
ydb-dbapiA Python DBAPI driver for YDB that provides…
unclear · top 5,000 on PyPI
pytdpytd provides Python interfaces to Treasure…
permissive · top 15,000 on PyPI