skillfed

impyla

Python client for the Impala distributed query engine

impyla v0.24.0 11.8M downloads/30d#1,364 on PyPI744
Permissive license Apache License, Version 2.0 Active released

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 impyla

uv

uv add impyla

poetry

poetry add impyla

Installing 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

Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

hiveserver2 python clientimpala query driverdistributed sql pythondb api hive connectorhiveserver2 connectorimpala python interfacedistributed query client
distributed-queryhiveserver2db-api-2.0

More Database packages