V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
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 · May 5, 2014 · 10361 views
    This topic created in 4377 days ago, the information mentioned may be changed or developed.
    最近在搞毕业论文,需要写一个 Web server, 提供接口给移动端(iOS)调用,实现一些类似注册,登录的功能,这个要怎么下手比较好?已有 Python 基础的了,希望大家指条路,或者提供点资料,我去试试。先行谢过!
    10 replies    2017-03-22 17:32:35 +08:00
    notedit
        1
    notedit  
       May 5, 2014   ❤️ 1
    BiggerLonger
        2
    BiggerLonger  
       May 5, 2014   ❤️ 1
    http+json吧, web server任意挑一款web framework
    clino
        3
    clino  
       May 5, 2014   ❤️ 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  
       May 5, 2014   ❤️ 1
    http+json...
    前一阵刚好用tornado写过一个很简单的
    no13bus
        5
    no13bus  
       May 5, 2014
    @BiggerLonger nice。现在我觉得这个比写什么web server快多了。http请求资源即可。web framework都有了。
    lowstz
        6
    lowstz  
       May 6, 2014
    Django REST framework
    davidlau
        7
    davidlau  
       May 7, 2014
    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  
       May 13, 2014
    顺道借问,如何处理请求阻塞的问题。
    zjnjxufe
        9
    zjnjxufe  
       May 14, 2014
    学习一两个web框架就行了, flask django and so on.
    SeanCrstian
        10
    SeanCrstian  
       Mar 22, 2017
    楼主你好,我最近在做毕设也有这个需求,想咨询一下需要学习哪些东西呢?我想用 iOS 端发送 HTTP 请求给 Python 编写的后台服务器,就是不知道怎么下手。。 求指导。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5651 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 50ms · UTC 06:03 · PVG 14:03 · LAX 23:03 · JFK 02:03
    ♥ Do have faith in what you're doing.