--- id: impyla version: "0.24.0" license: Apache License, Version 2.0 license_treatment: permissive maintenance: active --- # impyla — Python client for the Impala distributed query engine License: permissive · Maintenance: active · Downloads: 11.8M/mo ## 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 above — 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 pip install impyla uv add impyla 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_current - Install friction: low - Maintenance: active - Downloads: 11.8M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags hiveserver2 python client, impala query driver, distributed sql python, db api hive connector, hiveserver2 connector, impala python interface, distributed query client, distributed-query, hiveserver2, db-api-2.0 [View on SkillFed](https://skillfed.io/packages/impyla) · [View on PyPI](https://pypi.org/project/impyla/)