A Python client for the Thrift interface to Hive Metastore
Project description
pymetastore 🐝 🐍
pymetastore
is a Python client for Hive Metastore.
Features
- Python-friendly interface for Hive Metastore
- Comprehensive support for metadata operations
- Fully compatible with the Hive metastore service over Thrift protocol
Installation
Install pymetastore with pip:
pip install pymetastore
Quick Start
Here's a taste of using pymetastore
to connect to Hive Metastore and interact with metadata:
from pymetastore.metastore import HMS
with HMS.create(host="localhost", port=9083) as hms:
databases = hms.list_databases()
database = hms.get_database(name="test_db")
tables = hms.list_tables(database_name=database.name)
table = hms.get_table(
database_name=database.name,
table_name=tables[0],
)
partitions = hms.list_partitions(
database_name=database.name,
table_name=table.name,
)
partition = hms.get_partition(
database_name=database.name,
table_name=table.name,
partition_name="partition=1",
)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pymetastore-0.3.1.tar.gz
(131.0 kB
view hashes)
Built Distribution
pymetastore-0.3.1-py3-none-any.whl
(131.7 kB
view hashes)
Close
Hashes for pymetastore-0.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4ba40b53ad22bfdd192fe5a898aae1d91c7c93b6c9b605c70ee694c8c3328df |
|
MD5 | f03ef68959d0c551fe030e69704b1ff7 |
|
BLAKE2b-256 | 7581660c37e71b0bab8efa6bba10079eb66df679d135b1134cacae49904dabb6 |