Moving to Python for web

E

ecazs.net

So, I have been working in PHP for several years but I want to learn something new. That something new is Python. But since I'm a web developer I wantto build stuff for the web.

I don't want to use Django because it's too bloated, it seem to do everything for you. I don't like that. I want to do the "plumbing". But at the sametime I have no idea how I would write something that could handle cookies,sessions, post, get etc etc; so I assume I have to use some kind of web framework.

So, can you recommend a minimal web framework that still allows me to writein Python? Furthermore, do I even need one? I am currently running NGINX and I have UWSGI installed. I'm just worried about how I would handle form submissions, get requests and sessions/cookies.

Any advice would be greatly appreciated.
 
J

Joel Goldstick

So, I have been working in PHP for several years but I want to learn something new. That something new is Python. But since I'm a web developer I want to build stuff for the web.

I don't want to use Django because it's too bloated, it seem to do everything for you. I don't like that. I want to do the "plumbing". But at the same time I have no idea how I would write something that could handle cookies, sessions, post, get etc etc; so I assume I have to use some kind of web framework.

So, can you recommend a minimal web framework that still allows me to write in Python? Furthermore, do I even need one? I am currently running NGINXand I have UWSGI installed. I'm just worried about how I would handle formsubmissions, get requests and sessions/cookies.

Any advice would be greatly appreciated.

I like django, but you may want to google "python micro web framework"

There are a handful with some following so that there are communities,
docs, etc available

As to get/cookies/sessions check out the requests module (3rd party -
well received) http://docs.python-requests.org/en/latest/
 
A

Andreas Ecaz

I like django, but you may want to google "python micro web framework"



There are a handful with some following so that there are communities,

docs, etc available



As to get/cookies/sessions check out the requests module (3rd party -

well received) http://docs.python-requests.org/en/latest/









--

Joel Goldstick

http://joelgoldstick.com

I've looked at Flask, Bottle and Web.py. I quite like the look of Bottle. I'll keep looking for some other microframeworks, maybe I can find somethingelse that interests me.

Thank you.
 
A

Andreas Ecaz

I've looked at Flask, Bottle and Web.py. I quite like the look of Bottle. I'll keep looking for some other microframeworks, maybe I can find something else that interests me.



Thank you.

At the moment I'm worried about writing more framework than python (if that makes sense) which seems unlikely with MOST microframeworks.
 
C

Chris “Kwpolska†Warrick

there are MANY micro frameworks, I have been following these guys for a few
years
http://www.pocoo.org/

+1. The Pocoo team makes many awesome things.
specifically jinja2 and flask looks to be the best choice out of all the
options out there

Jinja2 is a standalone templating engine, something like Smarty for
PHP. And Flask is a microframework, which adds on top of Jinja2 (not
mandatory) and Werkzeug (another Pocoo project) to make a nice and
easy webdevelopment base. IMO it is the best choice in terms of
microframeworks.

But microframeworks are, as the name states, micro. The big
frameworks include tons of abstractions and fancy features. Some
people may like them, others may not. (Those features can obviously
be implemented in the microframeworks on one’s own or through existing
open-source code.)
 
A

Andreas Ecaz

I've decided to go with Flask! It's now running on UWSGI with NGINX. Hopefully I can get some stuff done :)


@Chris “Kwpolska” Warrick

I just don't like the big frameworks, for me there is too much magic going on.
 
C

Chris “Kwpolska†Warrick

I've decided to go with Flask! It's now running on UWSGI with NGINX. Hopefully I can get some stuff done :)

How are you running uWSGI? On sane (non-Windows) OSes, I recommend
using the uWSGI Emperor, which will protect you from your website
going down when something crashes. You run the Emperor through your
OS’s init system (e.g. upstart in Ubuntu, systemd in many others).
 
A

Andreas Ecaz

How are you running uWSGI? On sane (non-Windows) OSes, I recommend

using the uWSGI Emperor, which will protect you from your website

going down when something crashes. You run the Emperor through your

OS’s init system (e.g. upstart in Ubuntu, systemd in many others).



--

Chris “Kwpolska” Warrick <http://kwpolska.tk>

PGP: 5EAAEA16

stop html mail | always bottom-post | only UTF-8 makes sense

Well, I know I'm not using Emperor. I'm fairly new to managing servers myself but I'll take a look at how to set that up.
 
W

Wayne Werner

I've decided to go with Flask! It's now running on UWSGI with NGINX. Hopefully I can get some stuff done :)


@Chris “Kwpolska” Warrick

I just don't like the big frameworks, for me there is too much magic going on.

I'm a huge fan of Flask - I also find that when you start to learn more
and more about Flask you can see how Django would be super useful, if you
need all the bells and whistles.

-W
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top