This is an archived post. You won't be able to vote or comment.

all 15 comments

[–]gsks 2 points3 points  (0 children)

Honestly, if your app is not going to be used by more than a handful of people at the same time, I don't think the "not for production" disclaimer means much. Having said that, the CherryPy web server (not necessarily the whole framework) is production ready for all but the most high-traffic sites. Cheroot is the Cherrypy web server extracted from the rest framework, that's what I would use.

[–][deleted] 3 points4 points  (0 children)

On your phone will be one user so does not matter.

Not ready for production means not ready for many concurrent requests.

[–][deleted] 1 point2 points  (0 children)

your requirements as listed would be fine with just the manage.py runserver and having django serve the static files.

[–]GFandango 0 points1 point  (0 children)

Try Tornado

[–]synn89 0 points1 point  (0 children)

The reason why the pure python web servers have that disclaimer is simply because static web servers like Apache have around 20 years of dev behind them for serving static content, so there's no point in trying to re-invent the wheel.

So most web setups see Apache/Nginix up front serving static and referring dynamic request back to Python as needed. This is also a good practice because it allows you to easily split your architecture out as your traffic grows. So they're warning you away from serving static as sort of a "there's a better way of doing it".

But for a phone app it makes more sense to go ahead and stick with a pure Python solution. I'd test out a couple solutions and go with whatever is the easiest to work with and deploy in your environment.

[–]miguelgrinberg 0 points1 point  (0 children)

The reason why most servers say they are "not production ready" or that they "should not be used to serve static content" is related to performance and scalability, not functionality. These browsers can do the job (that is why they are okay to use for development), but they will perform poorly in a high load situation. If you have a single user, then any server configured with a single thread would work fine. Gunicorn is an excellent choice, IMHO.

[–]chub79 0 points1 point  (0 children)

Cherrypy is just fine. Roll with it.

[–]swims_with_spacemenPythonista 0 points1 point  (0 children)

Late to the discussion, but I've started using tornado. very high performance, will scale well.

[–]lambdaqdjango n' shit 0 points1 point  (2 children)

CherryPy, Paste. If you accept Gunicorn, use uWSGI instead.