Skip to main content

hbase

Coverage Docs PyPI Latest Release
License Code style: black

Hbase REST API client built using uplink

Main Features

  • A transparent and user friendly HBase REST API client
  • Easy to extend by subclassing and utilizing uplink's Consumer class
  • A great alternative to HBase Thrift client

Installation

$ pip install hbase

---> 100%

Usage

Build an instance to interact with the web service, check out the HBase client reference for a full list of available methods.

from hbase import HBase

hbase = HBase(base_url="http://localhost:8000")

Then, executing an HTTP request is as simply as invoking a method.

# Get all rows using the wildcard, or supply exact row_id for single row
hbase.get_row(table="example_table", row_id="*")

The returned object is a friendly Pydantic model which will automatically decode the response from base64:

CellSet(
    Row=[
        Row(
            key="decoded_key", 
            Cell=[
                Cell(
                    column="decoded_column", 
                    timestamp=39082034, 
                    value="decoded_value"
                ), 
                ...
            ]
        ), 
    ...]
)

Similarly you can perform other CRUD operations on HBase, such as inserting a row, note that the data will automatically be encoded into base64 for you free of charge!

hbase.insert_rows(
    test_table_name, 
    rows={
        "row-1": {
            "col1": "dat1", 
            "col2": "dat2"
        }, 
        "row-2": {
            "col1": "dat1", 
            "col2": "dat2"
        }
    }
)
hbase.insert_row(
    test_table_name, 
    row_id="row-3", 
    column_data={
        "col1": "dat1", 
        "col2": "dat2"
    }
)

For sending non-blocking requests, HBase uses Uplink, which comes with support for aiohttp and twisted.

Credits

License

Release files for hbase 1.0.0

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

Source distribution (sdist)

Source distribution for hbase 1.0.0
File Size Uploaded
hbase-1.0.0.tar.gz 15.9 kB Details

Built distribution (wheel)

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

Total release size: 31.9 kB

Release files / hbase-1.0.0.tar.gz

Download URL hbase-1.0.0.tar.gz
Size 15.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b8b9b4fd81c70caa6334570a35f4265a75a7198850a1579939ba7b0e1c8a7900
BLAKE2b-256 checksum
How to use checksums
f813a1b5200f47e25efe81adc326a338725a58b1cd93d0e72bbe255b079e4326
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.8 CPython/3.9.6 Linux/5.8.0-1039-azure

Release files / hbase-1.0.0-py3-none-any.whl

Download URL hbase-1.0.0-py3-none-any.whl
Size 16.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
21c2b6501dd44c018a6b8b738ae09cd2346f30940c9704784c4f11b124ce0ed8
BLAKE2b-256 checksum
How to use checksums
e760f133770773d3b14204b065e7af565485d2d5aaacb6ab07125b0338debee0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.8 CPython/3.9.6 Linux/5.8.0-1039-azure

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.2.0

1 release file

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

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