Skip to content

Commit 84cdf38

Browse files
mbrukmanbillyjacobson
authored andcommitted
[bigtable] Clean up quickstart comments and vars (#1890)
Clean up comments and variable names as this quickstart will be sourced directly into our quickstart docs.
1 parent cc820e6 commit 84cdf38

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

bigtable/quickstart/main.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
16+
1617
# [START bigtable_quickstart]
1718
import argparse
1819

@@ -21,23 +22,23 @@
2122

2223
def main(project_id="project-id", instance_id="instance-id",
2324
table_id="my-table"):
24-
# Creates a Bigtable client
25+
# Create a Cloud Bigtable client.
2526
client = bigtable.Client(project=project_id)
2627

27-
# Connect to an existing instance:my-bigtable-instance
28+
# Connect to an existing Cloud Bigtable instance.
2829
instance = client.instance(instance_id)
2930

30-
# Connect to an existing table:my-table
31+
# Open an existing table.
3132
table = instance.table(table_id)
3233

33-
key = 'r1'
34-
row = table.read_row(key.encode('utf-8'))
34+
row_key = 'r1'
35+
row = table.read_row(row_key.encode('utf-8'))
3536

3637
column_family_id = 'cf1'
3738
column_id = 'c1'.encode('utf-8')
3839
value = row.cells[column_family_id][column_id][0].value.decode('utf-8')
3940

40-
print('Row key: {}\nData: {}'.format(key, value))
41+
print('Row key: {}\nData: {}'.format(row_key, value))
4142

4243

4344
if __name__ == '__main__':

0 commit comments

Comments
 (0)