Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #54952 > unrolled thread

Which Python Framework for REST API and Facebook Wrapper?

Started byharry.andrei@gmail.com
First post2013-09-28 09:20 -0700
Last post2013-09-30 12:24 -0700
Articles 3 — 3 participants

Back to article view | Back to comp.lang.python


Contents

  Which Python Framework for REST API and Facebook Wrapper? harry.andrei@gmail.com - 2013-09-28 09:20 -0700
    Re: Which Python Framework for REST API and Facebook Wrapper? Joel Goldstick <joel.goldstick@gmail.com> - 2013-09-28 12:35 -0400
    Re: Which Python Framework for REST API and Facebook Wrapper? waynejwerner@gmail.com - 2013-09-30 12:24 -0700

#54952 — Which Python Framework for REST API and Facebook Wrapper?

Fromharry.andrei@gmail.com
Date2013-09-28 09:20 -0700
SubjectWhich Python Framework for REST API and Facebook Wrapper?
Message-ID<d4a8b09c-ea7f-4bff-b605-073fefaaaf33@googlegroups.com>
I will be designing a REST based API for a cross-platform back end that will serve both desktop Facebook users as well as mobile users. It will handle operations such as user creation, retrieval of user and other data, payment verification and in the case of the desktop side, handle the html/css template customization. The database back end is MySQL and I do need a cache system.

Currently we were using Codeigniter (PHP) for our codebase but as CI seems on the way out, I do not wish to start a new project based on it. I was looking at Laravel for PHP, but, Python is very attractive to me as a language and since the introduction of WSGI, I am confident it can make a difference in performance and code maintainability over PHP while being able to plug in to our dedicated server infrastructure. 

Since I am not experienced with Python frameworks (though learning curve is not much of an issue for me) I look to the community to understand which Python framework can rival or surpass Codeigniter in terms of performance in heavy traffic backend solutions (over 1M requests per day, with up to 100 req/sec at peak). I really want to make the switch from PHP to Python as I believe that Python can solve more problems with less code and faster execution time, not to mention freedom from brackets and semicolons.

[toc] | [next] | [standalone]


#54954

FromJoel Goldstick <joel.goldstick@gmail.com>
Date2013-09-28 12:35 -0400
Message-ID<mailman.420.1380386117.18130.python-list@python.org>
In reply to#54952

[Multipart message — attachments visible in raw view] — view raw

On Sat, Sep 28, 2013 at 12:20 PM, <harry.andrei@gmail.com> wrote:

> I will be designing a REST based API for a cross-platform back end that
> will serve both desktop Facebook users as well as mobile users. It will
> handle operations such as user creation, retrieval of user and other data,
> payment verification and in the case of the desktop side, handle the
> html/css template customization. The database back end is MySQL and I do
> need a cache system.
>
> Currently we were using Codeigniter (PHP) for our codebase but as CI seems
> on the way out, I do not wish to start a new project based on it. I was
> looking at Laravel for PHP, but, Python is very attractive to me as a
> language and since the introduction of WSGI, I am confident it can make a
> difference in performance and code maintainability over PHP while being
> able to plug in to our dedicated server infrastructure.
>
> Since I am not experienced with Python frameworks (though learning curve
> is not much of an issue for me) I look to the community to understand which
> Python framework can rival or surpass Codeigniter in terms of performance
> in heavy traffic backend solutions (over 1M requests per day, with up to
> 100 req/sec at peak). I really want to make the switch from PHP to Python
> as I believe that Python can solve more problems with less code and faster
> execution time, not to mention freedom from brackets and semicolons.
> --
> https://mail.python.org/mailman/listinfo/python-list
>

While there several others with smaller footprint, django is probably the
elephant in the room

-- 
Joel Goldstick
http://joelgoldstick.com

[toc] | [prev] | [next] | [standalone]


#55104

Fromwaynejwerner@gmail.com
Date2013-09-30 12:24 -0700
Message-ID<0780a1b5-3e72-4f90-bcba-87e0c6f539b6@googlegroups.com>
In reply to#54952
On Saturday, September 28, 2013 11:20:21 AM UTC-5, harry....@gmail.com wrote:
> I will be designing a REST based API for a cross-platform back end that will serve both desktop Facebook users as well as mobile users. It will handle operations such as user creation, retrieval of user and other data, payment verification and in the case of the desktop side, handle the html/css template customization. The database back end is MySQL and I do need a cache system.
> 
> 
> 
> Currently we were using Codeigniter (PHP) for our codebase but as CI seems on the way out, I do not wish to start a new project based on it. I was looking at Laravel for PHP, but, Python is very attractive to me as a language and since the introduction of WSGI, I am confident it can make a difference in performance and code maintainability over PHP while being able to plug in to our dedicated server infrastructure. 
> 
> 
> 
> Since I am not experienced with Python frameworks (though learning curve is not much of an issue for me) I look to the community to understand which Python framework can rival or surpass Codeigniter in terms of performance in heavy traffic backend solutions (over 1M requests per day, with up to 100 req/sec at peak). I really want to make the switch from PHP to Python as I believe that Python can solve more problems with less code and faster execution time, not to mention freedom from brackets and semicolons.

If you're looking for something simple, there are solutions like Flask (my favourite), CherryPy, Bottle, and web2py. (I only know the names of the last 3) I recommend taking a look into the likes of Flask, if only to familiarize yourself with some of the techniques of Python frameworks. Here's a basic Flask app:

from flask import Flask
app = Flask(__name__)

@app.route('/')
def main():
    return "Hey, I'm in a Flask!"

if __name__ == "__main__":
    app.run('0.0.0.0', port=5000, debug=True)


If you're looking for performance, Tornado (http://www.tornadoweb.org/en/stable/) I've heard is pretty awesome - though I've not put it through the paces myself.

HTH,
-W

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web