Search code examples
pythondjangopylonscherrypy

Which Python framework is flexible and similar to CodeIgniter in PHP?


The requirement is to develop a HTML based facebook app. It would not be content based like a newspaper site, but will mostly have user generated data which would be aggregated and presented from database + memcache. The app would contain 4-5 pages at most, with different purposes.

We decided to write the app in Python instead of PHP , and tried to evaluate django. However, we found django is not as flexible as how CodeIgniter in PHP is i.e. putting less restrictions and rules, and allowing you to do what you want to do.

PHP CodeIgnitor is minimalistic MVC framework, which we would have chosen if we were to develop in PHP.

Can you please suggest a flexible and minimalistic python based web framework? I have heard of pylons,cheeryPy,web.py , but I am completely unaware of their usage and structure.


Solution

  • Pyramid and Flask are both good options. Personally I think where pyramid shines is in it's flexibility in routing requests to view functions. You can do route based which is similar to how django does it though it's not full on regex matching and if you are willing to use resources/traversal you can do some really crazy things with access control lists.

    You may not need that stuff and you are free to not use it. But it does scale up nicely to a super complex application. And it runs on python 3 where I don't think flask does yet, but it will eventually.