Deploy Python Script On Google Cloud Platform
Solution 1:
From the script row in the Handlers element table:
A script: directive must be a python import path, for example, package.module.app that points to a WSGI application. The last component of a script: directive using a Python module path is the name of a global variable in the module: that variable must be a WSGI app, and is usually called app by convention.
Note: just like for a Python import statement, each subdirectory that is a package must contain a file named
__init__.py
I'd recommend spending some time going through the code snippets from Quickstart for Python App Engine Standard Environment, where you'll see a basic structure of a simple app.
A requirements.txt
file can be used to specify the list of packages to be installed in the lib
directory, like this:
pip install -r requirements.txt -t lib
But it's not absolutely necessary, packages can be explicitly specified directly on the pip
cmdline as well.
Post a Comment for "Deploy Python Script On Google Cloud Platform"