Skip to main content

EasyBase

https://github.com/wgzhao/easybase/actions/workflows/python-package.yml/badge.svg https://img.shields.io/pypi/dm/easybase.svg https://img.shields.io/pypi/v/easybase.svg https://img.shields.io/pypi/pyversions/easybase.svg https://img.shields.io/pypi/implementation/easybase.svg

EasyBase is a developer-friendly Python library to interact with Apache HBase . The original source code forked from HappyBase.

Feature highlight

  • easy using

  • support HBase Thrift 2 protocol(HBase Thrift 1 is NO longer supported)

  • using thriftpy2 instead of old thriftpy

Installation

pip install easybase

Usage

Connect

import easybase
host, port = 'localhost', 9000
tbl = 'test1'
conn = easybase.Connection(host=host, port=port)
table = conn.table(tbl)
rs = conn.scan(limit=10)
for row in rs:
  print(row)

Create Table

table_def = {'cf1':dict(),
             'cf2':{'max_versions':2000}}
conn.create_table('test1', table_def)

Write row to table

puts = {'cf1:c1': 'v1',
        'cf1:c2': 'v2'
       'cf2:c2': 'v3'}
tbl = conn.table('test1')
tbl.put(row='rk1', puts)

Get row from table

rk = 'rk1'
tbl = conn.table('test1')
rs = tbl.row(rk)

Scan rows

tbl = conn.table('test1')
scanner = tbl.scan(row_start='rk_0001', row_stop='rk_0100')
for row in scanner:
  print(row)

Get all namespace

for ns in conn.list_namespaces():
     print(ns)

You can get detail in DemoClient.py

License

MIT License http://www.opensource.org/licenses/MIT.

Metadata

Release files for easybase 2.0.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 easybase 2.0.1
File Size Uploaded
easybase-2.0.1.tar.gz 36.9 kB Details

Built distribution (wheel)

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

Total release size: 70.2 kB

Release files / easybase-2.0.1.tar.gz

Download URL easybase-2.0.1.tar.gz
Size 36.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d1e2d2e5a7899612fd80254f4e77f3003e6cd1dee3dc05a8e87c8d5e6659c87e
BLAKE2b-256 checksum
How to use checksums
64b711a8efe28eaa9207d68df8af4579226ab049d59179578270bc32f1c923a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / easybase-2.0.1-py3-none-any.whl

Download URL easybase-2.0.1-py3-none-any.whl
Size 33.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a70b62453fd4745431c3f2a29f9d3f9c3062eeddd7d3d2e20cd7a308a67b897f
BLAKE2b-256 checksum
How to use checksums
63f30d01d62827bede310acb6fc17a87ff241324481544d9dcca42e10a6194d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

2.0.1 This release

2 release files

1.1.4

1 release file

1.1.3

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.5

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0

2 release files

0.6

2 release files

0.4

2 release files

0.2

1 release file

0.1

2 release files

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