Skip to main content

Python idiomatic client for Google Cloud Platform services.

build coverage

This client supports the following Google Cloud Platform services:

If you need support for other Google APIs, check out the Google APIs Python Client library.

Versioning

This library follows Semantic Versioning.

It is currently in major version zero (0.y.z), which means that anything may change at any time and the public API should not be considered stable.

Quickstart

$ pip install gcloud

Google Cloud Datastore

Google Cloud Datastore is a fully managed, schemaless database for storing non-relational data. Cloud Datastore automatically scales with your users and supports ACID transactions, high availability of reads and writes, strong consistency for reads and ancestor queries, and eventual consistency for all other queries.

See the Google Cloud Datastore docs for more details on how to activate Cloud Datastore for your project.

See the gcloud-python API datastore documentation to learn how to interact with the Cloud Datastore using this Client Library.

from gcloud import datastore
dataset = datastore.get_dataset('dataset-id-here')
# Then do other things...
query = dataset.query().kind('EntityKind')
entity = dataset.entity('EntityKind')

Google Cloud Storage

Google Cloud Storage allows you to store data on Google infrastructure with very high reliability, performance and availability, and can be used to distribute large data objects to users via direct download.

You need to create a Google Cloud Storage bucket to use this client library. Follow the steps on the Google Cloud Storage docs to learn how to create a bucket.

See the gcloud-python API storage documentation to learn how to connect to Cloud Storage using this Client Library.

import gcloud.storage
bucket = gcloud.storage.get_bucket('bucket-id-here', 'project-id')
# Then do other things...
key = bucket.get_key('/remote/path/to/file.txt')
print key.get_contents_as_string()
key.set_contents_from_string('New contents!')
bucket.upload_file('/remote/path/storage.txt', '/local/path.txt')

Contributing

Contributions to this library are always welcome and highly encouraged.

See CONTRIBUTING for more information on how to get started.

Supported Python Versions

We support:

We plan to support:

Supported versions can be found in our tox.ini config.

We explicitly decided not to support Python 2.5 due to decreased usage and lack of continuous integration support.

We also explicitly decided to support Python 3 beginning with version 3.3. Reasons for this include:

  • Encouraging use of newest versions of Python 3

  • Taking the lead of prominent open-source projects

  • Unicode literal support which allows for a cleaner codebase that works in both Python 2 and Python 3

License

Apache 2.0 - See LICENSE for more information.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gcloud-0.3.0.tar.gz (90.6 kB view details)

Uploaded Source

File details

Details for the file gcloud-0.3.0.tar.gz.

File metadata

  • Download URL: gcloud-0.3.0.tar.gz
  • Upload date:
  • Size: 90.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for gcloud-0.3.0.tar.gz
Algorithm Hash digest
SHA256 8f278e2030495c7f4f0a5daefbb0cead6f6bbd1a595b227ba04c105ebb38613e
MD5 5c268a46ca15c928ffc9d717b906639e
BLAKE2b-256 1390ba6fdb254585de404f3302d7eb3baa59b22e504f091343fe8518b16becf3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page