Skip to main content
https://badge.fury.io/py/happybase-mock.svg https://travis-ci.org/eliangcs/happybase-mock.svg?branch=master https://coveralls.io/repos/eliangcs/happybase-mock/badge.png?branch=master

A mocking library for HappyBase.

Installing HBase is not easy. Running HBase also costs high system resource. This library simulates HappyBase API in local memory, so you don’t have to set up HBase. This is handy if you want to do fast in-memory testing.

Installation

To install HappyBase-mock, just do:

pip install happybase-mock

Usage

The API and package structure of HappyBase-mock is a mimic of HappyBase. They are almost identical, so you can use it like you normally would do in HappyBase.

For example, you can replace happybase package with happybase_mock. Then all of the operations will be performed in memory:

import happybase_mock as happybase

pool = happybase.ConnectionPool(host='localhost', table_prefix='app')
with pool.connection() as conn:
    table = conn.table('table_name')
    table.put('rowkey', {'d:data': 'value'})

TIP: You can also use Mock library to help you patch HappyBase on runtime.

Contribute

Running Tests

Install test requirements:

pip install -r requirements-test.txt

Then run the test:

py.test

Release files for happybase-mock 0.10.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 happybase-mock 0.10.0
File Size Uploaded
happybase-mock-0.10.0.tar.gz 7.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for happybase-mock 0.10.0
File Interpreter ABI Platform
happybase_mock-0.10.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.4 kB

Release files / happybase-mock-0.10.0.tar.gz

Download URL happybase-mock-0.10.0.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ebc0026169f2f4456121269524599087fb3f416d2362d824657c4ce8ec2c355e
BLAKE2b-256 checksum
How to use checksums
13de2493eebd43776710cbdfecb4fd686f7b8e922875c363dd2760e7031071af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / happybase_mock-0.10.0-py3-none-any.whl

Download URL happybase_mock-0.10.0-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8c91787865c869ac6f5269768a75f5ea0c846162cdd82c5cf3de7aa09ed67c3b
BLAKE2b-256 checksum
How to use checksums
af7d870abb0f1158145fcb96b5ca1a1b6d76ba9a6ec5d06c7fd150fe24f88ec4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.10.0 This release

2 release files

0.9.0

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

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