diff options
author | Wouter Bolsterlee <wouter@bolsterl.ee> | 2016-07-28 09:43:46 +0200 |
---|---|---|
committer | Wouter Bolsterlee <wouter@bolsterl.ee> | 2016-07-28 09:43:46 +0200 |
commit | eae66a37fa13f8dcbe987df9b10a57ce6b691053 (patch) | |
tree | 7435efaec538bd6f4a3d360b2d6830f3618ffb3c /happybase/table.py | |
parent | ec5178d9b192cd0bc8641c804eeffc463b8db093 (diff) | |
download | happybase-eae66a37fa13f8dcbe987df9b10a57ce6b691053.tar.gz |
Use byte strings and print() function in example code
Diffstat (limited to 'happybase/table.py')
-rw-r--r-- | happybase/table.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/happybase/table.py b/happybase/table.py index 8866109..4400723 100644 --- a/happybase/table.py +++ b/happybase/table.py @@ -93,12 +93,13 @@ class Table(object): argument and returns the columns and values for this row as a dictionary. - The `row` argument is the row key of the row. If the `columns` argument - is specified, only the values for these columns will be returned - instead of all available columns. The `columns` argument should be - a list or tuple containing strings. Each name can be a column family, - such as `cf1` or `cf1:` (the trailing colon is not required), or - a column family with a qualifier, such as `cf1:col1`. + The `row` argument is the row key of the row. If the `columns` + argument is specified, only the values for these columns will be + returned instead of all available columns. The `columns` + argument should be a list or tuple containing byte strings. Each + name can be a column family, such as ``b'cf1'`` or ``b'cf1:'`` + (the trailing colon is not required), or a column family with a + qualifier, such as ``b'cf1:col1'``. If specified, the `timestamp` argument specifies the maximum version that results may have. The `include_timestamp` argument specifies @@ -424,8 +425,8 @@ class Table(object): This method stores the data in the `data` argument for the row specified by `row`. The `data` argument is dictionary that maps columns to values. Column names must include a family and qualifier part, e.g. - `cf:col`, though the qualifier part may be the empty string, e.g. - `cf:`. + ``b'cf:col'``, though the qualifier part may be the empty string, e.g. + ``b'cf:'``. Note that, in many situations, :py:meth:`batch()` is a more appropriate method to manipulate data. |