Question

Hi i am new to GAE and python. I am trying to create small web application in GAE using python. I intend to use Unirest module in application.

I followed instruction in this post and got following error.

no module named poster.encode

How can i install unirest successfully in GAE ?

Thanks

Was it helpful?

Solution

Add import sys to your main.py and add these lines.

# inject './lib' dir in the path so that we can simply do "import ndb" or whatever there's in the app lib dir.
if 'lib' not in sys.path:
    sys.path[0:0] = ['lib']

Create the lib folder in the root of your project and copy the unirest folder in lib folder.

You can now import unirest and use your library.

But, why not use the standard method and library provide by Google App Engine ?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top