Python web framework - other than Django - python

Are there any other good Python web frameworks? I'm looking to try something new, I have already used Django, web.py and pylons. Also, what frameworks are AJAX-oriented or have better support for AJAX?
I'm looking for something more agile, light weight.

Here is a really long list of python web frameworks

more than a framework, ToscaWidgets2 http://toscawidgets.org/documentation/tw2.core/
TW2 is a widget framework for any wsgi compliant python web framework, originally born for TurboGears, i use TW2 with Pylons, and i presume that can be used without problems with new Pyramid Web Framework (i never try to use with Django)
Now, if apart from Ajax, you like to review other Python Web Frameworks, my recomendation can be:
1) Pyramid, a evolution from repoze.bfg and Pylons, integrate great tools and developers.
2) Bootle, Flask great microframeworks for quick and dirty apps.
3) Tipfy, a web framework thinked for Google App Engine, the best for me for this (after Django)

There is a framework called Pyjamas which is along the lines of Google Web Toolkit which was used to build Gmail. Seems to fit the bill for your AJAX requirements.

You might check out web2py. Very easy to learn and use, and great Ajax support (see also, web2py components).

There is pylons https://stackoverflow.com/questions/48681/pros-cons-of-django-vs-pylons

Related

Python/Django REST API Architecture

I'm trying to build a niche social network like Instagram as a Python/Django application.
So the things I need, regarding architecture, are (I guess):
REST API (e.g. api.mystagram.com).
Public website (www.mystagram.com or mystagram.com).
URL shortener (e.g. mystagr.am).
Android app
iPhone app
Windows Phone app
...
Before this I only built simple to some less-simple websites, but never extremely complex with own custom APIs or so. I have never build my own REST API before (I have used other REST APIs though) or even built an Android/iPhone app and distributed it in the Play Store/App Store (I have made some typical hello world examples though).
So, the most important thing to me seems to create a kick-ass REST API first and proceed from there. I am blocked however by a few questions.
How should I organize the projects for the public website and REST API? Should these be separate Django projects or should I create only one Django project and add both the public website and REST API as an internal Django module?
Should the public website also make use of the REST API? Or is it better to just use the plain Django models for this?
Thanks in advance for any help! If somebody knows some great presentations or so on this topic (architecture), always welcome!
Kind regards,
Kristof
Django REST Framework
https://github.com/tomchristie/django-rest-framework
Very well maintained, great documentation, easy to use.
I think Tastypie will do what you want. And its simple and easy. Check this out - http://django-tastypie.readthedocs.org/en/latest/!
To Answer your first question, It would be good practice to put public web site and REST APIs into one django project. Now days every web application contains public web site as well as rest apis for mobile app. So it would be easier to maintain both website and rest apis if they both in one application. Below is Django REST Framework link.
https://github.com/tomchristie/django-rest-framework
For second question, Yes you can use rest apis in website also. But in general you don't need to do it. In most of the cases django model works for you.

Multi tier architecture implementation on Python

I need to create web application, which can be reached by user as regular web site and as XML-RPC web service. Also web site should have mobile version. I'm planning to use next technologies:
Django (for web frontends (regular and mobile)).
Pyramid (for web service).
SQLAlchemy, Memcached (for persistence level)
Later other projects can reach this data and providing logic, so I think it is better to make two tiers. I see it in next way:
Tier 1. Main logic service level. This level will provide API for frontend applications (Django powered web site, for example).
Tier 2. Different mostly end client applications (web site, API for remote client devices).
For communication between this tiers I'm planning to use XML-RPC protocol.
In this case it will be easy to scale it and add new front end application or connect another projects to this (I believe it).
I have main question, -- what can I use to make it easy build first tier? Maybe there is some framework good for that?
And what do you think about this whole architecture. Because I'm filling that I'm thinking in Java terms developing in Python. Maybe there is some another idioms in Python world for such situations.
Thanks for you time and help.
P. S.
Some links for reading are welcome.
This architecture really makes no sense. You're using Django, a full-stack web framework, for the front end, but not using it for the database. And you're using Pyramid, another full-stack web framework, for the web service side, thus ensuring that you duplicate all the business logic.
Much as I am an advocate of Django, I would say it has no place in your architecture. It looks like the only thing you're really using it for is URL routing and templates, both of which Pyramid does itself fine - you can even use Jinja2, which is based on Django's template language, as the template language in Pyramid if you like.
Doing it this way means that you can share the business logic between the front-end and web service code, since you'll almost certainly find that a lot of it will be the same.
I must say also that I don't understand the division into tiers, which you have described as separate from the front-end/web service division. To me, the web service is the second tier. It makes no sense to have a further division.
You should checkout the Turbogears framework as it is composed of several popular components: ORM with sqlalchemy, pylons for logic and support for WSGI, permits support for several templating engines for the frontend... endless.
I use it for several web-services behind AJAX-enabled front-ends (like Flex-based apps, among others). You can front end the TG2-based webapp with apache or your favorite WSGI-enabled web server too.
Checkout their website since they have a tutorial to setup a wiki in 20 minutes.
Cheers!

Good resources to start python for web development?

I'm really interested in learning Python for web development. Can anyone point me in the right direction? I've been looking at stuff on Google, but haven't really found anything that shows proper documentation and how to get started. Any recommended frameworks? Tutorials?
I've been doing PHP for 5 years now, so I just want to try something new.
Django is probably the best starting point. It's got great documentation and an easy tutorial (at http://djangoproject.com/) and a free online book too (http://www.djangobook.com/).
Web Server Gateway Interface
About
http://www.wsgi.org/en/latest/index.html
http://en.wikipedia.org/wiki/Web_Server_Gateway_Interface
Tutorials
http://webpython.codepoint.net/wsgi_tutorial
http://lucumr.pocoo.org/2007/5/21/getting-started-with-wsgi/
http://archimedeanco.com/wsgi-tutorial/
There are three major parts to python web frameworks, in my experience. From the front to back:
Views/Templates: Application frameworks don't function as independent scripts - instead, you map paths to python functions or objects which return html. To generate the html you probably need templates (aka views). Check out Cheetah.
Application framework/Server: There are plenty. CherryPy is my favorite, and is good for understanding how a python application server works because a) it's simple and b) unlike django and others, it is just the application server and doesn't include a templating engine or a database abstraction layer.
Database layer: I've actually never used it, but everyone seems to like SQLAlchemy. I prefer, in simple applications, executing SQL directly using a tool like psycopg2 (for postgres).
You can try Django. It's easy to learn, and it works with GAE (though the default version is 0.96, a little bit old, but you can change it). And there's a video about rapid development (by Guido Van Rossum) that goes through the basics of setting up a Django project in App Engine.

best framework on gae(python) ,like jquery on javascript ? has it?

i want to find a framework to make my work simple on gae ,
has it ?
thanks
i found one, but not very good http://code.google.com/p/appengine-framework/
There are a large number of frameworks you can use on App Engine - both those custom designed for it, and those that are general purpose and work fine on App Engine. If you've used a Python framework in the past, some small amount of searching will tell you if it will work on App Engine with or without modifications. Common frameworks that do work on App Engine include Django, web2py and Pylons.
There's a fairly comprehensive list or open source tools here.

Web development with python and sql

I need to build a web site with the following features:
1) user forum where we expect light daily traffic
2) database backend for users to create profiles, where they can log in
and upload media (pictures)
3) users can uses their profile to buy content from an online inventory
4) create web pages, shopping carts etc for online inventory
5) secure online credit card processing
I am very familiar with python but not with python web frameworks. I do know
some SQL. How do I get started developing something like this? Is Django
a good alternative?
Not programming related per se: Where do you recommend I get web hosting with a domain
name for an application like this?
Django was made for this kind of thing. Check it out.
As far as hosting, djangofriendly.com is a great resource. I have used WebFaction before and I am absolutely in love with how easy it is to get Django going with them and with their excellent customer service. Very top notch for reasonable prices if you are going the shared hosting route.
If you are looking to speed up some of the tasks described, you should check out Pinax and Django Pluggables. Thanks to the way Django applications are setup it is trivially easy to plug an application into your project.
You can try Pylons lightweight web framework.
Your requirements make pinax sound like a library you might want to look into if you go the django route.
Google App Engine will provide hosting for free as well as Django and a db..

Categories

Resources