Contenu connexe
Similaire à Bpstudy48 (20)
Bpstudy48
- 2. ✤ setomits
✤ :
✤ 2001 : CAC
✤ 2007 :
✤ 2008 :
✤ 2010 :
✤ 2011 : ←
2011 9 1
- 3. Python
✤ CAC /
✤ Python
✤
✤
✤
✤ UI
2011 9 1
- 4. Python
✤
✤
✤
✤
✤
✤
✤ Web
2011 9 1
- 5. Python
✤
✤ Python
✤ Apache + mod_python
↓
✤
✤
✤
2011 9 1
- 6. Python
✤
✤
✤
✤
✤ Online to Offline -
✤ Google App Engine
2011 9 1
- 7. ✤ →
✤ →
✤ →
✤ → ...
2011 9 1
- 8. ✤
✤
✤
✤
✤
→ Weak Ties
✤ Facebook / LinkedIn
→ Online to Offline
2011 9 1
- 9. TIPS 1/6
✤ GoogleAppEngineLauncher
Preferences... : “Python Path”
2011 9 1
- 10. TIPS 2/6
✤
✤ “Extra Flags”
“--address=0.0.0.0”
✤
dev_appserver.py --help
2011 9 1
- 11. TIPS 3/6
✤ App Engine
✤ app name
✤ app.yaml UI
memcached
application: myapp application: myapp
version: dev version: rel
...
→ dev.myapp.appspot.com → rel.myapp.appspot.com
2011 9 1
- 12. TIPS 4/6
✤
✤ myapp.apspot.com
appengine.google.com Versions
✤ 10
2011 9 1
- 13. TIPS 5/6
✤
✤
appengine_config.py
ref: http://d.hatena.ne.jp/nullpobug/20110528/1306516902
✤ Task Queue Cron ...
✤ basicauth.py
2011 9 1
- 14. class AuthMiddleware(object):
def __init__(self, application, realm, authdic):
self.application = application
self.realm = realm
self.authdic = authdic
def _allowed(self):
return ['Basic %s' % base64.b64encode('%s:%s' % (k, self.authdic[k]))
for k in self.authdic]
def _management_access(self, p):
if p.startswith('/task/') or p.startswith('/cron/'):
return True
else:
return False
def _authorized(self, a):
if a in self._allowed():
return True
else:
return False
def __call__(self, environ, start_response):
auth_header = environ.get('HTTP_AUTHORIZATION')
path_info = environ.get('PATH_INFO')
if self._management_access(path_info) or self._authorized(auth_header):
return self.application(environ, start_response)
return auth_required_app(environ, start_response, self.realm)
2011 9 1
- 15. TIPS 6/6
✤
✤ DateTimeProperty
UTC
✤ cron.yaml UTC
✤ UTC
2011 9 1
- 16. GAE
✤
OS
✤
✤
✤
2011 9 1
- 17. GAE
✤
✤
✤
✤ × http://hirukai.jp → ○ http://www.hirukai.jp
✤ Twitter OAuth
✤ IP
http://stackoverflow.com/questions/3284205/twitter-rate-limit-
exceeded-google-app-engine/3285127
2011 9 1