impyla
Python client for the Impala distributed query engine
What it is and what it does
impyla provides a standard Python database interface to Impala and Hive query engines via HiveServer2. It implements PEP 249 (DB API 2.0), making it compatible with tools and libraries that expect standard Python database drivers. The package handles authentication (Kerberos, LDAP, SSL, JWT), result fetching, and schema introspection through a familiar cursor-based API.
Typical usage involves connecting to a HiveServer2 endpoint, executing SQL queries, and retrieving results as tuples or converting them to pandas DataFrames. It supports both synchronous iteration over result sets and bulk fetching, making it suitable for ad-hoc queries and data pipeline integration. The package has four runtime dependencies (bitarray, thrift, thrift_sasl, pure-sasl) and requires Python 3.8 or later.
Use it for:
- Query Impala or Hive clusters from Python scripts for exploratory data analysis and ad-hoc SQL execution.
- Build ETL pipelines that extract data from distributed query engines and load into pandas for scikit-learn workflows.
- Integrate Impala/Hive queries into Python applications using standard DB API 2.0 patterns.
- Export query results to CSV by iterating over cursor rows and accessing column metadata.
- Connect securely to HiveServer2 with Kerberos or SSL authentication in enterprise environments.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
impyla is a Python DB API 2.0-compliant client for querying HiveServer2 implementations like Impala and Hive, supporting Kerberos, LDAP, SSL, and JWT authentication.
Yes. impyla is a mature, actively maintained DB API 2.0 client for HiveServer2 with low install friction, permissive licensing, no known vulnerabilities, and broad authentication support. Install it if you need to query Impala or Hive from Python.
Install
impyla on PyPI
pip
pip install impylauv
uv add impylapoetry
poetry add impylaInstalling impyla
Before you install
Low friction: pure Python wheel with four runtime dependencies (bitarray, thrift, thrift_sasl, pure-sasl). Active maintenance with a recent release 56 days ago and last commit 2026-06-19.
License in practice
Apache License, Version 2.0 (permissive) allows use, modification, and distribution with minimal restrictions; suitable for commercial and open-source projects.
Quickstart
pip install impyla
from impyla.dbapi import connect
conn = connect(host='my.host.com', port=21050)
cursor = conn.cursor()
cursor.execute('SELECT * FROM mytable LIMIT 100')
results = cursor.fetchall()
Requires a running HiveServer2 instance accessible at the specified host and port. Optional Kerberos support requires system Kerberos libraries (libkrb5-dev on Ubuntu, krb5-devel on RHEL/CentOS).
Verify before relying
- Performance characteristics and scalability limits for large result sets or high-concurrency scenarios.
- Compatibility with specific HiveServer2 versions or Impala releases beyond the general 'HiveServer2 compliant' claim.
- Whether pandas integration (as_pandas utility) is production-ready or primarily for exploratory use.
Package facts
| License | Apache License, Version 2.0 (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — bitarray, thrift, thrift_sasl, pure-sasl |
| Maintenance | actively maintained — 56 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 11,763,967/month — #1,364 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: impyla-0.24.0-py3-none-any.whl
Keywords: cloudera, impala, python, hadoop, sql, hdfs, mpp, spark, pydata, pandas, distributed, db api, pep 249, hive, hiveserver2, hs2
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
apache-airflow-providers-apache-impalaIntegrates Apache Impala with Apache Airflow,…
permissive · top 5,000 on PyPI
hdbcliA PEP 249-compliant Python database driver for…
unclear · top 5,000 on PyPI
PyHivePyHive provides DB-API and SQLAlchemy…
permissive · top 5,000 on PyPI
pydynamodbPyDynamoDB is a DB API 2.0 client for Amazon…
permissive · top 15,000 on PyPI
pyhdbA pure Python client library for connecting to…
permissive · top 15,000 on PyPI
databricks-dbapiProvides a DBAPI 2.0 connection interface and…
permissive · top 15,000 on PyPI
PyAthenaPyAthena is a Python DB API 2.0 client for…
permissive · top 1,000 on PyPI
trinoPython client library for Trino, a distributed…
permissive · top 1,000 on PyPI
ibis-frameworkIbis is a portable Python dataframe library…
permissive · top 5,000 on PyPI