5
**HappyBase** is a developer-friendly `Python <http://python.org/>`_ library to
6
interact with `Apache HBase <http://hbase.apache.org/>`_.
9
.. rubric:: Contents of this documentation
5
.. py:currentmodule:: happybase
7
**HappyBase** is a developer-friendly Python__ library to interact with `Apache
8
HBase`__. HappyBase is designed for use in standard HBase setups, and offers
9
application developers a Pythonic API to interact with HBase. Below the surface,
10
HappyBase uses the `Python Thrift library`__ to connect to HBase using its
11
Thrift__ gateway, which is included in the standard HBase 0.9x releases.
14
__ http://hbase.apache.org/
15
__ http://pypi.python.org/pypi/thrift
16
__ http://thrift.apache.org/
21
**Do you enjoy HappyBase?** Please consider making a small donation__ to let
22
me know you appreciate my work. Thanks!
24
__ https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZJ9U8DNN6KZ9Q
30
The example below illustrates basic usage of the library. The :doc:`user guide
31
<user>` contains many more examples.
37
connection = happybase.Connection('hostname')
38
table = connection.table('table-name')
40
table.put('row-key', {'family:qual1': 'value1',
41
'family:qual2': 'value2'})
43
row = table.row('row-key')
44
print row['family:qual1'] # prints 'value1'
46
for key, data in table.rows(['row-key-1', 'row-key-2']):
47
print key, data # prints row key and data for each row
49
for key, data in table.scan(row_prefix='row'):
50
print key, data # prints 'value1' and 'value2'
52
row = table.delete('row-key')
66
Additional documentation
67
========================
24
.. rubric:: External links
26
* `Documentation <http://happybase.readthedocs.org/>`_ (readthedocs.org)
82
* `Online documentation <http://happybase.readthedocs.org/>`_ (Read the Docs)
27
83
* `Downloads <http://pypi.python.org/pypi/happybase/>`_ (PyPI)
28
84
* `Source code <https://github.com/wbolster/happybase>`_ (Github)
31
.. rubric:: Indices and tables