skillfed

hmsclient

A package interact with the Hive metastore via the Thrift protocol

hmsclient v0.1.1 5.1M downloads/30d#2,165 on PyPI20
Permissive license Apache 2.0 Active released

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 hmsclient

uv

uv add hmsclient

poetry

poetry add hmsclient

Installing 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

Development Status :: 4 - BetaIntended Audience :: Information TechnologyLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Topic :: Database

Tags

hive metastore clientthrift hive connectionhive metadata pythonhive partition queriesmetastore thrift protocolhive database client
hive-integrationthrift-client

More Database packages