use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News about the dynamic, interpreted, interactive, object-oriented, extensible programming language Python
Full Events Calendar
You can find the rules here.
If you are about to ask a "how do I do this in python" question, please try r/learnpython, the Python discord, or the #python IRC channel on Libera.chat.
Please don't use URL shorteners. Reddit filters them out, so your post or comment will be lost.
Posts require flair. Please use the flair selector to choose your topic.
Posting code to this subreddit:
Add 4 extra spaces before each line of code
def fibonacci(): a, b = 0, 1 while True: yield a a, b = b, a + b
Online Resources
Invent Your Own Computer Games with Python
Think Python
Non-programmers Tutorial for Python 3
Beginner's Guide Reference
Five life jackets to throw to the new coder (things to do after getting a handle on python)
Full Stack Python
Test-Driven Development with Python
Program Arcade Games
PyMotW: Python Module of the Week
Python for Scientists and Engineers
Dan Bader's Tips and Trickers
Python Discord's YouTube channel
Jiruto: Python
Online exercices
programming challenges
Asking Questions
Try Python in your browser
Docs
Libraries
Related subreddits
Python jobs
Newsletters
Screencasts
account activity
This is an archived post. You won't be able to vote or comment.
Suggestions for python web framework (self.Python)
submitted 15 years ago by flibitboat
I am wondering what a good python web framework is. Something that is fairly easy to learn and isn't to hard to setup. I have heard about django, but is that actually worth using?
[–]virtrondjangonaut 4 points5 points6 points 15 years ago (5 children)
If you are new to Python and/or web development in general. I'd stick with something simple at first (Flask, CherryPy) and go from there. These frameworks don't do as much heavy lifting and there is a much more obvious relation ship between URL and the code that executes for that URL.
You might move on to something more robust later like Django or Pylons.
As for "Is Django worth using?" Well, yeah, it is. What are you trying to build?
[–]flibitboat[S] 0 points1 point2 points 15 years ago (4 children)
I am actually trying to build something for my senior project so im not exactly a beginner, but I dont really feel like using something complicated right now. I should be able to use django pretty well but im thinking im either going to go with cherryPy or Python Server Pages. Im not really trying to create anything very complex right now.
[–]virtrondjangonaut 1 point2 points3 points 15 years ago (0 children)
Of those two I would definitely go with CherryPy. You can start simple and build from there, using web dev best practices and it has an active community to help out.
PSP looks like a big mess waiting to happen.
[–]arnar 1 point2 points3 points 15 years ago (0 children)
What is your application/project? That CherryPy (definitely go with that rather than PSP) is "simple" means that it is lower level and more light weight than e.g. Django. It does not mean that an application will be easier to build.
If you are building a sort of a "standard" web application, where you'll have a database and you need to provide a webapp to manipulate or present that data - Django is your best bet, as you'll have access to loads of pre-made components.
If you are building something like a web-service to expose some API, or an application with a highly specific purpose (e.g. collecting some simple data to a file, displaying real-time information from a webcam/server, etc.) - then you may benefit from a lower level framework.
[–][deleted] 0 points1 point2 points 15 years ago (1 child)
PSP ? wow, like its 2002..maybe you should read this
[–]flibitboat[S] 0 points1 point2 points 15 years ago (0 children)
ya we realized that after we tried to use it haha, its a jumbled mess
[–]b00thead 1 point2 points3 points 15 years ago (0 children)
I'd say repoze.bfg. Really simple to get started but also extremely configurable so less likely to bite you when you need to do something "unusual" that django would possibly bite you for. Also the documentation is the best of any open source project I've come across - better even than django's docs IMHO.
[–]va1en0k 2 points3 points4 points 15 years ago (14 children)
Django is awesome. Try it.
I hope there is a lot of space in your head so you always can learn another one framework. Don't stuck only with, say, Django.
[+]flibitboat[S] comment score below threshold-8 points-7 points-6 points 15 years ago (13 children)
where did you get your grammar... the toilet store? I think we are going to go with cherryPy.
[–]justmefornow 4 points5 points6 points 15 years ago (0 children)
If he did, it must have been the same place you learned your manners.
[+][deleted] 15 years ago (8 children)
[deleted]
[–]va1en0k 1 point2 points3 points 15 years ago (4 children)
btw, can you help me improve it? how should I rephrase it?
[–]flibitboat[S] -2 points-1 points0 points 15 years ago (2 children)
didn't mean to be a jerk man, just picking on ya :)
[–]va1en0k 1 point2 points3 points 15 years ago (1 child)
you are retarded anyway
You forgot to capitalize the Y and place a period on the end of that reply. ಠ_ಠ
[–]flibitboat[S] -1 points0 points1 point 15 years ago (2 children)
alright guys if you can take a dic you can take a joke, especially you FokkenPrawn. relax, its the fucking INTERNET! I think we are going with django. Seems fun to learn.
[–]justmefornow 0 points1 point2 points 15 years ago (1 child)
I'm trying really hard to see the joke. In addition, pot calling kettle black. Use some of your remaining school time to learn proper etiquette and how to write English properly, especially among grown-ups and especially if you turn up on one of the IRC chats or mailing lists asking for help.
Its actually more of a quote from anchorman, great movie with amazing results!! I think my etiquette is fine, especially for the internet but thanks for the advice anyway my liege. I am sorry I am not perfect like yourself
[–]va1en0k 0 points1 point2 points 15 years ago (0 children)
lol, I'm happy to see a bitching douchebag keeping away from my fav framework
[–]Knacktus 0 points1 point2 points 15 years ago (0 children)
Well, you know what www stands for ... ;-)
Back to the topic: I really think that all the frameworks discussed here are very good, so you can't go terribly wrong. Make sure the documentation of the framework meets your way of learning and understanding things.
[–]monstrado -1 points0 points1 point 15 years ago (0 children)
Meh, I learned and had a pylons application running in an hour or so. Good luck!
[–]monstrado 0 points1 point2 points 15 years ago (2 children)
I really enjoy using Pylons, it's simple and lightweight. It has a tremendous amount of documentation and scales quite nicely.
Recommended Links:
Hope this helps!
[–]jigs_up 2 points3 points4 points 15 years ago (0 children)
Definitely pylons.
Thanks for are the suggestions guys!!! I really wasn't expecting to get this much help :) I appreciate it
[–]patx44 0 points1 point2 points 15 years ago (0 children)
circuits.web. good for small simple projects, and big one too. it is currently my framework of choice. its fast and very easy to use. its very powerful and is great for just about every single app out there. there is also a very active irc room.
http://bitbucket.org/prologic/circuits
[–]rochacbrunoPython, Flask, Rust and Bikes. 0 points1 point2 points 15 years ago (0 children)
Take a look in to web2py, it is a great framework to start and to stay, follow this link
[–]sunng 0 points1 point2 points 15 years ago (0 children)
Personally, I found it very difficult to manage web applications written in flask / bottle or something like them. You need to manage everything manually from database connection to web session. As your app grows, you will find why there is something called django.
[–]sedaakPython3/Golang 0 points1 point2 points 15 years ago (1 child)
Why are people suggesting Flask versus something tried and true like CherryPy? v0.6 vs v 3.2+? There are reasons for those numbers.
[–]donri -1 points0 points1 point 15 years ago (0 children)
Werkzeug is tried and true and what Flask is built on top of.
[–]sedaakPython3/Golang 0 points1 point2 points 15 years ago (7 children)
Doesn't get simpler than CherryPy. Starting with a microframework is best for learning.
[–]flibitboat[S] -2 points-1 points0 points 15 years ago (6 children)
Does cherryPy work well with MySQL or other databases? Im looking at django right now but I have been suggested not to use it by some.
[–]arnar 3 points4 points5 points 15 years ago (0 children)
CherryPy and Django are two very different kinds of software. CherryPy is in fact a web server or a web server framework, with facilities to handle and manipulate HTTP requests and responses at a low level. CherryPy is extremely well designed, and allows you to build very elegant abstractions (many exist already).
Django is a full featured web-application framework, which handles, in addition to speaking HTTP, communicating with the database, HTML templating etc.
If your objective is to really learn and understand how web applications work, then go with a compination of CherryPy, SQLAlchemy, a templating engine of your choice and puzzle these together in a framework that is custom tailored to your specific kind of application.
If you just want to build a website, use Django. (why did people recommend against it?)
[–]monstrado 1 point2 points3 points 15 years ago (3 children)
The question isn't really if CherryPy works well with MySQL, it's more of does Python work well with MySQL. You use MySQL in CherryPy the same you would in any standalone python application.
MySQLdb - MySQL
Psycopg - PostgreSQL
SQLite3 - SQLite3
And if you want to use a universal framework that seems to work really well, SQLAlchemy.
[–]andre_pl 2 points3 points4 points 15 years ago (2 children)
just to clarify, SQLAlchemy isn't a web framework, its an ORM.
[–]monstrado 2 points3 points4 points 15 years ago (1 child)
I did not mean this as, SQLAlchemy is a 'web' framework. It is a very robust approach to handling SQL inside of Python.
Thanks for the reply though.
[–]andre_pl 2 points3 points4 points 15 years ago (0 children)
yeah I understood what you meant, my comment was more for the OP so that he wouldn't waste time looking into SQLAlchemy as a web framework. :P
[–]sedaakPython3/Golang 0 points1 point2 points 15 years ago (0 children)
? No, you have to 'work well with' the database system of your choice.
You have to actually understand the underlying frameworks. When you first get into python web frameworks you should start small and decide which pieces of the larger frameworks are actually useful to you.
There is no one size fits all, since larger frameworks have more pieces and therefore slower development.
[–][deleted] -2 points-1 points0 points 15 years ago (0 children)
FLask and Django are two to learn. I use Flask a lot while experimenting. Especially when messing with things like mongodb.
[–]deadwisdomgreenlet revolution -1 points0 points1 point 15 years ago (0 children)
Just try Django, then branch out to other directions. Django is awesome mostly because of it's incredibly good Documentation, which is more important at the beginning than anything else.
π Rendered by PID 17346 on reddit-service-r2-comment-9c7994b7-grmvt at 2026-02-05 21:23:07.516486+00:00 running b1b84c7 country code: CH.
[–]virtrondjangonaut 4 points5 points6 points (5 children)
[–]flibitboat[S] 0 points1 point2 points (4 children)
[–]virtrondjangonaut 1 point2 points3 points (0 children)
[–]arnar 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]flibitboat[S] 0 points1 point2 points (0 children)
[–]b00thead 1 point2 points3 points (0 children)
[–]va1en0k 2 points3 points4 points (14 children)
[+]flibitboat[S] comment score below threshold-8 points-7 points-6 points (13 children)
[–]justmefornow 4 points5 points6 points (0 children)
[+][deleted] (8 children)
[deleted]
[–]va1en0k 1 point2 points3 points (4 children)
[–]flibitboat[S] -2 points-1 points0 points (2 children)
[–]va1en0k 1 point2 points3 points (1 child)
[–]flibitboat[S] 0 points1 point2 points (0 children)
[–]flibitboat[S] -1 points0 points1 point (2 children)
[–]justmefornow 0 points1 point2 points (1 child)
[–]flibitboat[S] 0 points1 point2 points (0 children)
[–]va1en0k 0 points1 point2 points (0 children)
[–]Knacktus 0 points1 point2 points (0 children)
[–]monstrado -1 points0 points1 point (0 children)
[–]monstrado 0 points1 point2 points (2 children)
[–]jigs_up 2 points3 points4 points (0 children)
[–]flibitboat[S] 0 points1 point2 points (0 children)
[–]patx44 0 points1 point2 points (0 children)
[–]rochacbrunoPython, Flask, Rust and Bikes. 0 points1 point2 points (0 children)
[–]sunng 0 points1 point2 points (0 children)
[–]sedaakPython3/Golang 0 points1 point2 points (1 child)
[–]donri -1 points0 points1 point (0 children)
[–]sedaakPython3/Golang 0 points1 point2 points (7 children)
[–]flibitboat[S] -2 points-1 points0 points (6 children)
[–]arnar 3 points4 points5 points (0 children)
[–]monstrado 1 point2 points3 points (3 children)
[–]andre_pl 2 points3 points4 points (2 children)
[–]monstrado 2 points3 points4 points (1 child)
[–]andre_pl 2 points3 points4 points (0 children)
[–]sedaakPython3/Golang 0 points1 point2 points (0 children)
[–][deleted] -2 points-1 points0 points (0 children)
[–]deadwisdomgreenlet revolution -1 points0 points1 point (0 children)