pymetastore
A Python client for the Thrift interface to Hive Metastore
What it is and what it does
pymetastore wraps the Thrift protocol used by Hive Metastore into a Python-friendly API, letting you programmatically query metadata about databases, tables, and partitions stored in a Hive metastore service. It depends only on thrift and supports Python 3.8 and later, making it a lightweight addition to data engineering workflows that need to inspect or manage Hive metadata without writing raw Thrift code.
The package is typically used in data pipelines and catalog systems where you need to discover table schemas, list partitions, or retrieve metadata properties from a running metastore. It abstracts away the low-level Thrift details and provides context managers and straightforward method calls for common operations like listing databases, fetching table definitions, and querying partition information.
Use it for:
- Discover table schemas and partition structures from a Hive metastore in a data discovery or catalog tool.
- Automate metadata validation or governance checks by querying metastore state programmatically.
- Build data pipeline orchestration logic that depends on inspecting table properties or partition availability.
- Integrate Hive metastore metadata into a data lineage or data quality monitoring system.
- Query partition information to dynamically determine which data to process in a batch job.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
pymetastore is a Python client for the Hive Metastore that provides a Thrift-based interface to query and manage metadata about databases, tables, and partitions in a Hive metastore service.
Yes, if you need to query a Hive Metastore from Python code. The package has low install friction, a permissive license, no known vulnerabilities, and provides a clean abstraction over Thrift. Maintenance is aging but not stalled—updates are infrequent but the repo is not archived. Suitable for production use in data engineering contexts where metastore access is a real requirement.
Install
pymetastore on PyPI
pip
pip install pymetastoreuv
uv add pymetastorepoetry
poetry add pymetastoreInstalling pymetastore
Before you install
Installation is straightforward with low friction—a pure Python wheel with a single runtime dependency on thrift. The package is in aging maintenance status with a last commit on 2025-11-04, so it receives updates but is not under active development.
License in practice
Licensed under MIT (permissive), so you can use, modify, and distribute pymetastore freely in both open-source and commercial projects without copyleft obligations.
Quickstart
pip install pymetastore
from pymetastore.metastore import HMS
with HMS.create(host="localhost", port=9083) as hms:
databases = hms.list_databases()
tables = hms.list_tables(database_name="test_db")
Requires a running Hive Metastore service accessible at the specified host and port (default 9083).
Verify before relying
- Whether the package supports all Hive metastore operations or only a subset of the full API.
- Performance characteristics and scalability limits when querying large metastores.
- Compatibility with specific Hive or Hadoop versions beyond the Python version requirement.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — thrift |
| Maintenance | aging — 283 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 125,436/month — #11,819 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pymetastore-0.4.2-py3-none-any.whl
Keywords: data, data catalog, data discovery, data engineering, data governance, data infrastructure, data integration, data pipelines, hcatalog, hive, hive metastore, metadata, metastore, thrift, python, recap
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
hmsclientA Python client for connecting to and querying…
permissive · top 5,000 on PyPI
google-cloud-dataproc-metastoreA Python client library for managing Dataproc…
permissive · top 1,000 on PyPI
pure-transportProvides a Thrift transport for PyHive…
permissive · top 15,000 on PyPI
google-cloud-bigquery-biglakePython client library for accessing BigLake…
permissive · top 5,000 on PyPI
apache-airflow-providers-apache-hiveIntegrates Apache Hive with Apache Airflow,…
permissive · top 15,000 on PyPI
databricks-dbapiProvides a DBAPI 2.0 connection interface and…
permissive · top 15,000 on PyPI
impylaimpyla is a Python DB API 2.0-compliant client…
permissive · top 5,000 on PyPI
PyHivePyHive provides DB-API and SQLAlchemy…
permissive · top 5,000 on PyPI
pyhiveapiA Python library for controlling Hive smart…
permissive · top 15,000 on PyPI