想写一个 Python 的 Web server, 提供接口给移动端(iOS)调用,怎么下手? - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
lztrey90
V2EX    Python

想写一个 Python 的 Web server, 提供接口给移动端(iOS)调用,怎么下手?

  •  
  •   lztrey90 2014-05-05 11:32:16 +08:00 10151 次点击
    这是一个创建于 4235 天前的主题,其中的信息可能已经有所发展或是发生改变。
    最近在搞毕业论文,需要写一个 Web server, 提供接口给移动端(iOS)调用,实现一些类似注册,登录的功能,这个要怎么下手比较好?已有 Python 基础的了,希望大家指条路,或者提供点资料,我去试试。先行谢过!
    10 条回复    2017-03-22 17:32:35 +08:00
    notedit
        1
    notedit  
       2014-05-05 11:50:01 +08:00   1
    BiggerLonger
        2
    BiggerLonger  
       2014-05-05 13:51:38 +08:00   1
    http+json吧, web server任意挑一款web framework
    clino
        3
    clino  
       2014-05-05 13:55:24 +08:00   1
    例行推荐uliweb:
    文档: http://limodou.github.io/uliweb-doc/
    邮件列: http://groups.google.com/group/uliweb
    QQ讨论组: 162487035

    有一些针对初学者的教程,QQ群里也有不少初学者在讨论,在邮件列表和QQ群中都可以和作者讨论问题
    ------
    uliweb 本身预置了一系列的基本的app,如(auth,mail,rbac,i18n等等): https://github.com/limodou/uliweb/tree/master/uliweb/contrib
    还有另外一个plugs项目,是一个较上层的uliweb app的集合:
    https://github.com/limodou/plugs/tree/master/plugs
    mulog
        4
    mulog  
       2014-05-05 14:24:14 +08:00   1
    http+json...
    前一阵刚好用tornado写过一个很简单的
    no13bus
        5
    no13bus  
       2014-05-05 15:43:53 +08:00
    @BiggerLonger nice。现在我觉得这个比写什么web server快多了。http请求资源即可。web framework都有了。
    lowstz
        6
    lowstz  
       2014-05-06 03:34:18 +08:00
    Django REST framework
    davidlau
        7
    davidlau  
       2014-05-07 11:04:50 +08:00
    Python的Flask,很简单的实现 拦截 http://localhost:8080/location/xxx 的HTTP GET request,打印并返回 "a query: /location/"+content

    8行搞定
    '''
    app = flask.Flask(__name__)

    @app.route('/location/<content>',methods=['GET'])
    def location(content):
    str = "a query: /location/"+content
    print str
    return str
    if __name__ == '__main__':
    app.run(port=8080)
    '''
    halfcrazy
        8
    halfcrazy  
       2014-05-13 23:22:29 +08:00
    顺道借问,如何处理请求阻塞的问题。
    zjnjxufe
        9
    zjnjxufe  
       2014-05-14 16:21:23 +08:00
    学习一两个web框架就行了, flask django and so on.
    SeanCrstian
        10/span>
    SeanCrstian  
       2017-03-22 17:32:35 +08:00
    楼主你好,我最近在做毕设也有这个需求,想咨询一下需要学习哪些东西呢?我想用 iOS 端发送 HTTP 请求给 Python 编写的后台服务器,就是不知道怎么下手。。 求指导。。
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     2186 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 23ms UTC 16:07 PVG 00:07 LAX 08:07 JFK 11:07
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86