Skip to content

Repository files navigation

gcloud_requests

GitHub licensePyPI VersionBuild StatusCode Climate

Thread-safe client functionality for google-cloud-{datastore,storage} via requests.

Installation

pip install --upgrade gcloud_requests

Usage

Google Cloud Datastore:

fromgoogle.cloudimportdatastorefromgcloud_requestsimportDatastoreRequestsProxyclient=datastore.Client(_http=DatastoreRequestsProxy(), _use_grpc=False)
client.query(kind="EntityKind").fetch()

Google Cloud Storage:

fromgoogle.cloudimportstoragefromgcloud_requestsimportCloudStorageRequestsProxyproxy=CloudStorageRequestsProxy()
client=storage.Client(credentials=proxy.credentials, _http=proxy)
bucket=client.get_bucket("my-bucket")

Running Tests

  1. Install the dev deps with pip install -r requirements-dev.txt
  2. then run py.test.

Note: This will run the tests against whatever GCP project you're currently logged into via the gcloud tool.

Authors

gcloud_requests was authored at Leadpages. You can find out more about contributors here. We welcome contributions, and we're always looking for more engineering talent!

Contributing

Please read our contributor's guide.

About

Thread-safe client functionality for gcloud-python via requests.

Resources

Contributing

Stars

16 stars

Watchers

37 watching

Forks

Releases

Packages

Used by

Contributors

Languages