Skip to main content

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.4.1.tar.gz (133.8 kB view hashes)

Uploaded Source

Built Distribution

pymetastore-0.4.1-py3-none-any.whl (132.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page