How do I 'install' a module on Google App

2019-04-12 04:59发布

Excuse me as I'm new to this. I've done all the searching I can, and while I know the module I want to install, I can't figure out how to install the specific module.

I'm wanting to install Python-OAuth2 to GAE, but as I can't find the specific oauth2.py file, I don't know what to copy into my app's directory on my machine (let alone if that will work).

What is the most direct way of installing third-party python modules on Google App Engine?

2条回答
淡お忘
2楼-- · 2019-04-12 05:20

Modules in python are nothing but python files. Packages are directories that contain an __init__.py file. You can import a python file called foobar.py that resides in the same directory as the file you're importing from like so import foobar at which point you will get everything in foobar under the foobar. namespace.

查看更多
时光不老,我们不散
3楼-- · 2019-04-12 05:27

For this particular case, copy the entire oauth2 directory to your app's folder. It should work.

查看更多
登录 后发表回答