SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member videocast's Avatar
    Join Date
    Oct 2013
    Location
    127.0.0.1
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile Cherrypy and Mako:

    I've been experimenting with the Cherrypy framework along with 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

    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.

  2. #2
    SitePoint Addict
    Join Date
    Aug 2013
    Location
    New Zealand
    Posts
    277
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    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

  3. #3
    SitePoint Addict
    Join Date
    Aug 2013
    Location
    New Zealand
    Posts
    277
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    What do you like about CherryPy? I've not used it.

    Sent from my XT316 using Tapatalk 2

  4. #4
    SitePoint Member videocast's Avatar
    Join Date
    Oct 2013
    Location
    127.0.0.1
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Kiwiheretic View Post
    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.


    Features

    • A fast, HTTP/1.1-compliant, 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 !


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •