sae 是新浪推出的PaaS业务,可以提供免运维的容器服务,官方网站( https://www.sinacloud.com/ )
假设您已经在本地开发好了web.py 应用,您可以通过github客户端上传代码到sae中新建的python应用中。
只要web.py应用包含文件index.wsgi,新浪云就会加载我们的应用。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| #!/usr/bin/env python # -*- coding: utf-8 -*- # file code.py import sys import os import web
urls = ("/", "Index", ) app = web.application(urls, globals()) application = app.wsgifunc() web.config.debug = True
class Index: def __init__(self): pass
def GET( self ): if session.login == 1: data = index1(session.user) return render_template('index.html', name=data ) else: raise web.seeother('/login')
if __name__ == "__main__": app.run()
|
其他内容,可以自行参考sae官方文档。https://www.sinacloud.com/doc/sae/python.html
欣赏此文,求鼓励,求支持! if you like, you can donate money for me.