Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: Cloud Bigtable Client class should be a Context Manager #1793

Closed
tswast opened this issue May 12, 2016 · 0 comments
Closed

FR: Cloud Bigtable Client class should be a Context Manager #1793

tswast opened this issue May 12, 2016 · 0 comments
Assignees
Labels
api: bigtable Issues related to the Bigtable API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@tswast
Copy link
Contributor

tswast commented May 12, 2016

It would be great if I could say:

with bigtable.Client() as client:
    cluster = client.cluster('us-central1-c', 'my-cluster')
    # ...

and the Client class would call start and stop for me. I believe we could make __enter__ call start and __exit__ call stop.

@tseaver tseaver added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. api: bigtable Issues related to the Bigtable API. labels May 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the Bigtable API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

4 participants