GithubHelp home page GithubHelp logo

vvbandeira / google-cloud-python-examples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alfonsof/google-cloud-python-examples

0.0 0.0 0.0 54 KB

Python examples on Google Cloud Platform (GCP). How to manage Compute Engine VM instances, Cloud Storage buckets, etc.

License: MIT License

Python 100.00%

google-cloud-python-examples's Introduction

Python examples on Google Cloud Platform (GCP)

This repo contains Python code examples on Google Cloud Platform (GCP).

These examples show how to use Python 3 and Google Python Client Libraries in order to manage services on Google Cloud Platform. These use Google Cloud Python Client Library or Google API Python Client Library.

Google Python Client Libraries allow Python developers to write software that makes use of Google Cloud services like Compute Engine and Cloud Storage.

Google Python Client Libraries offers two different styles of API:

  • Google Cloud Client Library for Python: It is the recommended option for accessing Cloud APIs programmatically, where available. It is an idiomatic, intuitive, and natural way for Python developers to integrate with Google Cloud Platform services, like Cloud Datastore and Cloud Storage.
  • Google API Client Library for Python: A number of Google Cloud APIs do not yet have Google Cloud Client Libraries available in Python. If you want to use one of these APIs and there is no Cloud Client Library for Python, you can still use an older version of the client libraries called Google API Client Libraries.

Quick start

You must have a Google Cloud Platform (GCP) account.

The code for the samples is contained in individual folders on this repository.

For instructions on running the code, please consult the README in each folder.

This is the list of examples:

Compute - Compute Engine:

  • gcloudcomputeengine - Compute Engine VM instances: Example of how to handle Compute Engine VM instances. It uses the Google API Client Library.

Compute - Cloud Functions:

  • gcloudfunctionpubsubevent - Cloud Function Pub/Sub Event: Example of how to handle a Google Cloud Function that sends information about a Cloud Pub/Sub event that depends on the input to the function log.
  • gcloudfunctionhttprequest - Google Cloud Function HTTP Request: Example of how to handle a Google Cloud Function that responds to an HTTP request.
  • gcloudfunctiongcsevent - Google Cloud Function Cloud Storage Event: Example of how to handle a Google Cloud Function that sends information to the function log about an object when it appears in a Cloud Storage bucket.
  • gcloudfunctiongcscopy - Google Cloud Function Cloud Storage Copy: Example of how to handle an Google Cloud Function and copy an object when it appears in a Cloud Storage bucket to another Cloud Storage bucket.
  • gcloudfunctiongcsmove - Google Cloud Function Cloud Storage Move: Example of how to handle an Google Cloud Function function and move an object when it appears in a Cloud Storage bucket to another Cloud Storage bucket.

Storage - Cloud Storage:

  • gcloudstoragecreate - Google Cloud Storage Create: Example of how to handle Cloud Storage buckets and create a new Google Storage bucket in a Google Cloud Project. It uses the Google Cloud Client Library.
  • gcloudstoragedelete - Google Cloud Storage Delete: Example of how to handle Cloud Storage buckets and delete a Google Storage bucket in a Google Cloud Project. It uses the Google Cloud Client Library.
  • gcloudstoragelist - Google Cloud Storage List: Example of how to handle Cloud Storage buckets and list information about the objects in a Cloud Storage bucket in a Google Cloud Project. It uses the Google Cloud Client Library.
  • gcloudstoragelistall - Google Cloud Storage List All: Example of how to handle Cloud Storage buckets and list information about all Cloud Storage buckets and the objects that they contain in a Google Cloud Project. It uses the Google Cloud Client Library. The credentials are taken from GOOGLE_APPLICATION_CREDENTIALS environment variable.
  • gcloudstoragelistallparam - Google Cloud Storage List All Parameters: Example of how to handle Cloud Storage buckets and list all Cloud Storage buckets and the files they contain in a Google Cloud Project. The user must provide the credentials using the application parameters.
  • gcloudstorageupload - Google Cloud Storage Upload: Example of how to handle Cloud Storage buckets and upload a local file to a Cloud Storage bucket in a Google Cloud Project. It uses the Google Cloud Client Library.
  • gcloudstoragedownload - Google Cloud Storage Download: Example of how to handle Cloud Storage buckets and download an object in a Cloud Storage bucket in a Google Cloud Project to a local file. It uses the Google Cloud Client Library.
  • gcloudstoragedeleteobject - Google Cloud Storage Delete Object: Example of how to handle Cloud Storage buckets and delete an object in a Google Storage bucket in a Google Cloud Project. It uses the Google Cloud Client Library.
  • gcloudstoragecopy - Google Cloud Storage Copy: Example of how to handle Cloud Storage buckets and copy an object from a Google Storage bucket to another Google Storage bucket in a Google Cloud Project. It uses the Google Cloud Client Library.
  • gcloudstoragemove - Google Cloud Storage Move: Example of how to handle Cloud Storage buckets and move an object from a Google Storage bucket to another Google Storage bucket in a Google Cloud Project. It uses the Google Cloud Client Library.

License

This code is released under the MIT License. See LICENSE file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.