开发者

Bundle module with app on Google App Engine

开发者 https://www.devze.com 2022-12-24 05:55 出处:网络
This may be a basic question but how can I include a module with my app. I\'m very new to python and what I want to do is to include this module simplejson with my app, but after downloading it I ha

This may be a basic question but how can I include a module with my app.

I'm very new to python and what I want to do is to include this module simplejson with my app, but after downloading it I have no idea what to do next :(

This is how the module looks like after unzip it.

开发者_Go百科

I don't know what files to move to my app.

Bundle module with app on Google App Engine


Put the simplejson directory (that is inside the simplejson-2.1.0) in your app.

Or, you could just use the simplejson lib that's bundled with the Django lib that's bundled with App Engine by doing the following import wherever you need it:

from django.utils import simplejson

That's always available, without needing to bundle anything extra with your app. The only drawback I can think of is that it will be out of date (though I don't know how far out of date).


Put the directory (or a link) into your deployment directory and appcfg.py update will send it along to the server. This is documented in the Python Runtime Environment page.

0

精彩评论

暂无评论...
验证码 换一张
取 消