skillfed

presto-python-client

Client for the Presto distributed SQL Engine

presto-python-client v0.8.4 4.9M downloads/30d#2,199 on PyPI244
Permissive license Apache 2.0 Active released

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-client

uv

uv add presto-python-client

poetry

poetry add presto-python-client

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: PythonProgramming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Database :: Front-Ends

Tags

presto sql client pythondistributed sql query pythonpresto dbapi connectorquery presto clusterpresto python interface
database-clientsql-querydistributed-sql

More Front-Ends packages