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 · 9544 次点击
    这是一个创建于 3646 天前的主题,其中的信息可能已经有所发展或是发生改变。
    最近在搞毕业论文,需要写一个 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
    SeanCrstian  
       2017-03-22 17:32:35 +08:00
    楼主你好,我最近在做毕设也有这个需求,想咨询一下需要学习哪些东西呢?我想用 iOS 端发送 HTTP 请求给 Python 编写的后台服务器,就是不知道怎么下手。。 求指导。。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1125 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 22:55 · PVG 06:55 · LAX 15:55 · JFK 18:55
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.