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
Metadata
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)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| happybase-mock-0.10.0.tar.gz | 7.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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 |
Security for happybase-mock 0.10.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.