hmsclient
A package interact with the Hive metastore via the Thrift protocol
What it is and what it does
HMSClient is a thin Python wrapper around Thrift-generated code for communicating with the Hive metastore. It provides a simple interface to query Hive metadata—such as checking for named partitions—by wrapping the low-level Thrift protocol details. The package depends on thrift for protocol handling and click for its code generation utility.
The client is designed for developers who need programmatic access to Hive metastore information from Python. It uses a context-manager pattern for connections and exposes methods like check_for_named_partition to interact with the metastore. The package also includes a code generation tool (generate.py) that can regenerate the Thrift bindings from updated .thrift schema files.
Use it for:
- Check whether a specific partition exists in a Hive table before running ETL jobs
- Programmatically query Hive metadata from Python applications or data pipelines
- Regenerate Thrift client code when upgrading to a newer Hive metastore schema
- Integrate Hive metastore queries into data orchestration or validation workflows
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Python client for connecting to and querying the Hive metastore via the Thrift protocol, enabling programmatic access to Hive metadata and partition information.
Yes, if you need Hive metastore access from Python and are working with a compatible Hive version. The low install friction and permissive license make it straightforward to adopt. However, note that the package has not been updated since 2018—verify that the Thrift protocol implementation works with your target Hive metastore version before relying on it in production.
Install
hmsclient on PyPI
pip
pip install hmsclientuv
uv add hmsclientpoetry
poetry add hmsclientInstalling hmsclient
Before you install
Low install friction with only 2 runtime dependencies (thrift and click). The package is actively maintained with recent commits, though the latest release was in 2018.
License in practice
Licensed under Apache 2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions beyond attribution and liability disclaimers.
Quickstart
pip install hmsclient
from hmsclient import hmsclient
client = hmsclient.HMSClient(host='localhost', port=9083)
with client as c:
c.check_for_named_partition('db', 'table', 'date=20180101')
Requires a running Hive metastore server accessible at the specified host and port; thrift compiler needed only if regenerating bindings via generate.py
Verify before relying
- Whether the Thrift protocol implementation remains compatible with current Hive metastore versions
- Python version support beyond 3.5 and 3.6 listed in classifiers
- Whether the package handles Hive metastore schema changes since 2018
Package facts
| License | Apache 2.0 (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — thrift, click |
| Maintenance | actively maintained — 3,034 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 5,115,887/month — #2,165 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: hmsclient-0.1.1-py3-none-any.whl
Keywords: hive, data, database, thrift, metastore
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
hive-metastore-clientA Python client for connecting to Apache Hive…
unclear · top 15,000 on PyPI
pymetastorepymetastore is a Python client for the Hive…
permissive · top 15,000 on PyPI
pure-transportProvides a Thrift transport for PyHive…
permissive · top 15,000 on PyPI
thriftThrift is the Python bindings for Apache…
permissive · top 1,000 on PyPI
thriftpy2ThriftPy2 is a pure Python implementation of…
permissive · top 5,000 on PyPI
thrift-saslImplements SASL authentication transports for…
permissive · top 5,000 on PyPI
google-cloud-bigquery-biglakePython client library for accessing BigLake…
permissive · top 5,000 on PyPI
PyHivePyHive provides DB-API and SQLAlchemy…
permissive · top 5,000 on PyPI
google-cloud-dataproc-metastoreA Python client library for managing Dataproc…
permissive · top 1,000 on PyPI
apache-airflow-providers-apache-hiveIntegrates Apache Hive with Apache Airflow,…
permissive · top 15,000 on PyPI