Cherrypy and Mako:

I’ve been experimenting with the Cherrypy framework along with [URL=“http://www.makotemplates.org/”]Mako templates and I have to say, I LIKE IT!!!
Half tempted to drop PHP in favor of Python, but I have a lot to learn before jumping into the abyss :crazy:

The framework IMHO is straightforward and more importantly flexible while the template language accepts straight python and offers some additional enhancements.

I’m pleased to meet the Python users here on the forum and I apologize in advance for some of my newb questions coming in the next few weeks.

I haven’t used CherryPy but I have used Django a lot. I think anything that gives you a decent templating system is a plus. Even PHP has MVC frameworks but they seem not popular.

Sent from my XT316 using Tapatalk 2

What do you like about CherryPy? I’ve not used it.

Sent from my XT316 using Tapatalk 2

4 major things come to mind…

1.) I’m using a config file so the actual locations of my files and templates have no affect on any links.
This also allows me to locate them more strategically for maintenance and/or move them around without affecting the application.

2.) I mentioned above how my template language allows me to enter straight Python, but CherryPy also allows me to enter straight Python.

3.) I like the ability to expose only the code I choose to the web.

4.) CherryPy is light, which IMHO is a good thing, I don’t mind adding code to support options like databases, etc…

In addition to the Cherrypy items mentioned, there are many more features, but these four stand out in my mind the most right now.
I’ve not use Django or any other Python framework (for the web), so I have no comparison, but I did look at 3 or 4 frameworks and at least that many template languages and picked CherryPy + Mako based on their write ups and philosophy

CherryPY:

     CherryPy is a pythonic, object-oriented web framework
                        CherryPy allows developers to build web applications in  much the same way they would build any other object-oriented Python  program. This results in smaller source code developed in less time.

       CherryPy is now more than seven years old and it is has  proven to be very fast and stable. It is being used in production by  many sites, from the simplest to the most demanding ones.

     
                              [h=1]Features[/h]                  
  • A fast, HTTP/1.1-compliant, [URL=“http://www.wsgi.org/en/latest/index.html”]WSGI thread-pooled webserver.
  • Easy to run multiple HTTP servers (e.g. on multiple ports) at once.
  • A powerful configuration system for developers and deployers alike.
  • A flexible plugin system.
  • Built-in tools for caching, encoding, sessions, authorization, static content, and many more.
  • Swappable and customizable…everything.
  • Built-in profiling, coverage, and testing support.
  • Runs on Python 2.5+, 3.1+, Jython and Android.

Mako:

Philosophy:
Python is a great scripting language. Don’t reinvent the wheel…your templates can handle it !