Coder Social home page Coder Social logo

hanifmahboobi / compute-getting-started-python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from googlearchive/compute-getting-started-python

0.0 2.0 0.0 293 KB

This sample python application demonstrates how to access the Compute Engine API using the Google Python API Client Library.

License: Apache License 2.0

Python 77.41% Shell 22.59%

compute-getting-started-python's Introduction

status: inactive

This project is no longer actively developed or maintained.

This sample has been moved to GoogleCloudPlatform/python-docs-samples.

Getting Started with Compute Engine and the Google Python Client Library

Google Compute Engine features a RESTful API that allows developers to run virtual machines in the cloud. This sample python command-line application demonstrates how to access the Compute Engine API using the Google Python API Client Library.

Pre-requisites

  1. Create a project on the Google Developers Console and enable billing.
  2. Install the Google Cloud SDK
curl https://sdk.cloud.google.com | bash
gcloud auth login
gcloud config set project your-project-id
  1. Install dependencies using pip
pip install -r requirements.txt

Running the sample

python main.py

The sample will:

  1. Create an instance with a start up script and metadata.
  2. Print out the URL where the modified image will be written.
  3. Waits for input from the user and then delete the instance.

The start up script executes these steps on the instance:

  1. Installs Image Magick on the machine.
  2. Downloads the image from the URL provided in the metadata.
  3. Adds the text provided in the metadata to the image.
  4. Copies the edited image to Cloud Storage.

Products

Contributing changes

Licensing

compute-getting-started-python's People

Contributors

briandorsey avatar brisbink avatar drewbryant avatar dwightjl avatar elibixby avatar gbin avatar paulrashidi avatar

Watchers

 avatar  avatar

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.