cherrypy

CherryPy: How to process a request before it has reached the application method?

CherryPy: How to process a request before it has reached the application method? Question: I want to be able to catch the arguments of the methods of my CherryPy application before the method itself. But I’m not sure if there is a way to do it in CherryPy or with standard python. It should look …

Total answers: 2

Python – Flask Default Route possible?

Python – Flask Default Route possible? Question: In Cherrypy it’s possible to do this: @cherrypy.expose def default(self, url, *suburl, **kwarg): pass Is there a flask equivalent? Asked By: John Jiang || Source Answers: There is a snippet on Flask’s website about a ‘catch-all’ route for flask. You can find it here. Basically the decorator works …

Total answers: 4

How can I get Bottle to restart on file change?

How can I get Bottle to restart on file change? Question: I’m really enjoying Bottle so far, but the fact that I have to CTRL+C out of the server and restart it every time I make a code change is a big hit on my productivity. I’ve thought about using Watchdog to keep track of …

Total answers: 4

How to POST JSON data with Python Requests?

How to POST JSON data with Python Requests? Question: I need to POST a JSON from a client to a server. I’m using Python 2.7.1 and simplejson. The client is using Requests. The server is CherryPy. I can GET a hard-coded JSON from the server (code not shown), but when I try to POST a …

Total answers: 10

CherryPy vs Django

CherryPy vs Django Question: CherryPy vs Django, which would you use and why? Asked By: flybywire || Source Answers: Django, because the community is so much larger. You’ll find more 3rd-party modules you can use and you’ll find much more support. Answered By: Fragsworth I would use Django because of its large user base and …

Total answers: 7

How do I configure the ip address with CherryPy?

How do I configure the ip address with CherryPy? Question: I’m using python and CherryPy to create a simple internal website that about 2 people use. I use the built in webserver with CherryPy.quickstart and never messed with the config files. I recently changed machines so I installed the latest Python and cherrypy and when …

Total answers: 3