|
1 | | -[//]: # "This README.md file is auto-generated, all changes to this file will be lost." |
2 | | -[//]: # "To regenerate it, use `python -m synthtool`." |
| 1 | +# Python Code Samples for Cloud Bigtable |
3 | 2 |
|
4 | | -## Python Samples for Cloud Bigtable |
| 3 | +This directory contains code samples for Cloud Bigtable, which may be used as a reference for using this product. |
5 | 4 |
|
6 | | -This directory contains samples for Cloud Bigtable, which may be used as a refererence for how to use this product. |
| 5 | +## Prerequisites |
| 6 | + |
| 7 | +1. If this is your first time working with GCP products, you will need to set up [the Cloud SDK][cloud_sdk] or utilize [Google Cloud Shell][gcloud_shell]. This sample may [require authentication][authentication] and you will need to [enable billing][enable_billing]. |
| 8 | + |
| 9 | +2. Set your environment variables: |
| 10 | + ```bash |
| 11 | + export GOOGLE_CLOUD_PROJECT="your-project-id" |
| 12 | + export BIGTABLE_INSTANCE="your-instance-id" |
| 13 | + ``` |
| 14 | + |
| 15 | +## Running Samples and Tests |
| 16 | + |
| 17 | +1. Install dependencies for the sample module you want to run: |
| 18 | + ```bash |
| 19 | + pip install -r requirements.txt |
| 20 | + ``` |
| 21 | + |
| 22 | +2. Run sample scripts directly: |
| 23 | + ```bash |
| 24 | + python main.py $GOOGLE_CLOUD_PROJECT $BIGTABLE_INSTANCE |
| 25 | + ``` |
| 26 | + |
| 27 | +3. To run sample tests using Nox: |
| 28 | + ```bash |
| 29 | + nox -s py-3.14 |
| 30 | + ``` |
7 | 31 |
|
8 | 32 | ## Additional Information |
9 | 33 |
|
10 | 34 | You can read the documentation for more details on API usage and use GitHub |
11 | | -to <a href="https://github.com/googleapis/python-bigtable">browse the source</a> and [report issues][issues]. |
| 35 | +to <a href="https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-bigtable">browse the source</a> and [report issues][issues]. |
12 | 36 |
|
13 | 37 | ### Contributing |
14 | | -View the [contributing guidelines][contrib_guide], the [Python style guide][py_style] for more information. |
| 38 | + |
| 39 | +View the [contributing guidelines][contrib_guide] and the [Python style guide][py_style] for more information. |
15 | 40 |
|
16 | 41 | [authentication]: https://cloud.google.com/docs/authentication/getting-started |
17 | | -[enable_billing]:https://cloud.google.com/apis/docs/getting-started#enabling_billing |
| 42 | +[enable_billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing |
18 | 43 | [client_library_python]: https://googlecloudplatform.github.io/google-cloud-python/ |
19 | | -[issues]: https://github.com/GoogleCloudPlatform/google-cloud-python/issues |
| 44 | +[issues]: https://github.com/googleapis/google-cloud-python/issues |
20 | 45 | [contrib_guide]: https://github.com/googleapis/google-cloud-python/blob/main/CONTRIBUTING.rst |
21 | 46 | [py_style]: http://google.github.io/styleguide/pyguide.html |
22 | 47 | [cloud_sdk]: https://cloud.google.com/sdk/docs |
23 | 48 | [gcloud_shell]: https://cloud.google.com/shell/docs |
24 | | -[gcloud_shell]: https://cloud.google.com/shell/docs |
|
0 commit comments