Skip to main content

HMSClient

This project aims to be an up to date Python client to interact with the Hive metastore using the Thrift protocol.

Installation

Install it with pip install hmsclient or directly from source

python setup.py install

Usage

Using it from Python is simple:

from hmsclient import hmsclient
client = hmsclient.HMSClient(host='localhost', port=9083)
with client as c:
    c.check_for_named_partition('db', 'table', 'date=20180101')

Regenerate the Python thrift library

The hmsclient.py is just a thin wrapper around the generated Python code to interact with the metastore through the Thrift protocol.

To regenerate the code using a newer version of the .thrift files, you can use generate.py (note: you need to have thrift installed, see here)

python generate.py --help

Usage: generate.py [OPTIONS]

Options:
  --fb303_url TEXT      The URL where the fb303.thrift file can be downloaded
  --metastore_url TEXT  The URL where the hive_metastore.thrift file can be
                        downloaded
  --package TEXT        The package where the client should be placed
  --subpackage TEXT     The subpackage where the client should be placed
  --help                Show this message and exit.

Otherwise the defaults will be used.

Metadata

Release files for hmsclient 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hmsclient 0.1.1
File Size Uploaded
hmsclient-0.1.1.tar.gz 84.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hmsclient 0.1.1
File Interpreter ABI Platform
hmsclient-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 174.9 kB

Release files / hmsclient-0.1.1.tar.gz

Download URL hmsclient-0.1.1.tar.gz
Size 84.4 kB
Tags Source
SHA-256 checksum
How to use checksums
908bdf1e082865d2b8a87a25290f8bd16b3bf4e71c028762231a9cfa49814286
BLAKE2b-256 checksum
How to use checksums
a4b537ad13cc386f22ea68446aa636497082db38cff42801f9c3aefa02310eaa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / hmsclient-0.1.1-py3-none-any.whl

Download URL hmsclient-0.1.1-py3-none-any.whl
Size 90.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6163c46ecbd7b97e10099039186155fe2712ade1630da7c90075e3ccac91d909
BLAKE2b-256 checksum
How to use checksums
35a9c8607f2e1e4f9312767723a3a938f09cb9bd98644359569af6eddce3e8ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

0.0.2

2 release files

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page