Archive for the 'cherrypy' Category
Wednesday, February 25th, 2009
The most basic case is very simple.
import time
import cherrypy
class WebSvc(object):
@cherrypy.tools.caching(delay=300)
@cherrypy.expose
def quadruple(self, number):
time.sleep(1) # make the real call somewhat costly
return str(int(number) * 4)
cherrypy.quickstart(WebSvc())
That uses an in-memory cache and [...]
Posted in General, Python, Software, cherrypy, computing | 5 Comments »
Thursday, January 8th, 2009
Eric Florenzano posted a detailed blog entry on creating fast web utilities with bare WSGI. In the blog he shared that the larger Python web frameworks are overkill for small utility-like applications. He then proceeded to build a small utility app that conforms to the WSGI spec.
I like to use CherryPy to write [...]
Posted in General, Python, Software, cherrypy | 5 Comments »
Wednesday, April 2nd, 2008
For work today I wanted a way to iterate over an HTTP response with chunked transfer-coding on a chunk-for-chunk basis. I didn’t see a builtin way to do that with httplib. It supports chunked reads but you have to specify the amount that you want to read if you don’t want it to [...]
Posted in General, Python, cherrypy, computing, work | No Comments »
Friday, May 11th, 2007
CherryPy Essentials
Author: Sylvain Hellegouarch
Publisher: Packt Publishing
Pages: 257
Introduction
The title CherryPy Essentials is a bit of a misnomer, as this book covers far more than the bare essentials of CherryPy 3. Admittedly, a book on simply the essentials would be little more than a leaflet, as CherryPy is very easy to understand and be productive with. [...]
Posted in General, Python, cherrypy | 3 Comments »
Wednesday, December 6th, 2006
I had to disable comments on my projects site because of comment SPAM. They won’t be renabled until I get some decent anti-spam measures in place. Really, the software that runs the projects site is in need of a serious rewrite. As I mentioned to someone who inquired about it being upgraded [...]
Posted in General, Python, cherrypy | No Comments »
Tuesday, November 7th, 2006
Inspired by wsgicollection, I cooked up a collection implementation for CherryPy 2.2.x. Here is the docstring for the base Collection class:
A class representing a collection of items.
Items can be created, updated, viewed, listed and deleted. Dispatches
based on HTTP method and URL [...]
Posted in General, Python, cherrypy, computing | No Comments »
Friday, August 25th, 2006
I just released a new version of BuffetMyghty: 0.3
As I mentioned in a previous post, the main changes are improvements that were made in the Pylons fork of the plugin. All of the Myghty options are able to be passed to the plugin now, and fragments are supported.
Additionally, I wrote a very basic set [...]
Posted in General, Python, cherrypy | No Comments »
Saturday, August 12th, 2006
I released Buffet 1.0 today. No huge changes from 0.9, but a couple decent accomplishments.
Unit Tests
One of my goals for releasing a 1.0 version was to have unit tests for Buffet. Well, they are in there now. If nothing else, I feel a lot better about the code now that it has [...]
Posted in General, Python, cherrypy | 2 Comments »
Thursday, May 25th, 2006
I haven’t done much with Buffet lately, as it has been working fine for me. There have been a few people who have sent me patches for Buffet, so I figured I should get it in Subversion. Thanks to the artist formerly know as python-hosting.com, I’ve done that. I still need to [...]
Posted in General, Python, cherrypy | No Comments »
Thursday, May 11th, 2006
If you are reading this, it means I successfully migrated dowski.com to my new server.
The whole server conversion wasn’t too painful. I got my new VPS (Virtual Private Server) from VPSLand last Friday. I only had a few OS choices, none of them being Slackware, so I went with Debian (my other choices [...]
Posted in General, Python, cherrypy, computing | 1 Comment »