Google App Engine enables you to build and host web apps on the same systems that power Google applications. App Engine offers fast development and deployment; simple administration, with no need to worry about hardware, patches or backups; and effortless scalabilityThe Google App Engine provides a robust framework for developing web applications.
It turns out that is possible to use the Shotgun API from Google App Engine servers, which makes it possible to leverage the Google App Engine tools to build lightweight web based clients to the Shotgun database.
Here's how you can get started:
- Sign up for the Google App Engine account (from above link). Download the SDK, and go through the Google App Engine tutorial. As such things go this tutorial is super easy, and can be done in a leisurely two hours.
- Create a new application in the Google App Engine Launcher -- "File->Create New Application...", and check that the template application gives the "Hello World" result.
- Copy the "shotgun_api3.py" file into your google application folder.
- Copy the attached "shotgun_google_wrap.py" into the application folder.
- Replace "main.py" with the attached "main.py".
- Edit the "sg = Shotgun(...)" lines in the "main.py", replacing "YOUR_SG_SITE_NAME", "SG_REGISTERED_SCRIPT_NAME", "SCRIPT_APPLICATION_KEY" with the appropriate values.
- Run the app from the "Launcher" and "Browse" the results
The only problem that I ran into was that the successive Shotgun API calls don't work within the Google App Engine. I worked around this with the "shotgun_google_wrap" library, which is just a bunch of wrappers for the Shotgun API that creates a new "Shotgun" object before each API call.
--- John McLaughlin