Questions tagged [cherrypy]

CherryPy is a pythonic, object-oriented HTTP framework. See cherrypy.dev for more information. Ask for interactive help @ https://gitter.im/cherrypy/cherrypy

CherryPy is a pythonic, object-oriented HTTP framework.

Features

  • A HTTP/1.1-compliant, WSGI thread-pooled webserver. Typically, CherryPy itself takes only 1-2 ms per page.
  • Support for any other WSGI-enabled web server or adapter, including Apache, IIS, lighttpd, mod_python, FastCGI, SCGI, and mod_wsgi.
  • A native mod_python adapter.
  • Multiple HTTP servers (e.g. on multiple ports) at once.
  • A plugin system. CherryPy plugins hook into events within the server process — into server startup, server shutdown, server exiting, etc. — to run code that needs to be run when the server starts up or shuts down.
  • Built-in tools for caching, encoding, sessions, authorization, static content, and others. CherryPy tools hook into events within the request process. Whenever the CherryPy server receives a request, there is a specific set of steps it goes through to handle that request. Page handlers are only one step in the process. Tools also provide a syntax and configuration API for turning them on and off for a specific set of handlers.
  • A configuration system for developers and deployers. CherryPy deployments are configurable on site, on application and on controller level, through Python dictionaries, configuration files, and open file objects.
  • Every component is swappable and customizable.
  • A complete test suite:
    • tests for both basic and advanced functionality
    • command-line options to control which tests are run, and the output they produce
    • debugging tools specifically for web page tests
    • many of the test suite components are reusable by applications.
  • Built-in profiling since v2.1, coverage and testing support.
1372 questions
7
votes
3 answers

Socket error: Address already in use

I have a CherryPy script that I frequently run to start a server. Today I was having to start and stop it a few times to fix some bugs in a config file, and I guess the socket didn't close all the way because when I tried to start it up again I got…
Andrew Latham
  • 5,982
  • 14
  • 47
  • 87
7
votes
2 answers

pyinstaller: 2 instances of my cherrypy app exe get executed

I have a cherrypy app that I've made an exe with pyinstaller. now when I run the exe it loads itself twice into memory. Watching the taskmanager shows the first instance load into about 1k, then a second later a second instance of hte exe loads…
d.c
  • 243
  • 3
  • 6
7
votes
5 answers

What would you recommend for a high traffic ajax intensive website?

For a website like reddit with lots of up/down votes and lots of comments per topic what should I go with? Lighttpd/Php or Lighttpd/CherryPy/Genshi/SQLAlchemy? and for database what would scale better / be fastest MySQL ( 4.1 or 5 ? ) or PostgreSQL?
daniels
  • 18,416
  • 31
  • 103
  • 173
7
votes
4 answers

cherrypy and wxpython

I'm trying to make a cherrypy application with a wxpython ui. The problem is both libraries use closed loop event handlers. Is there a way for this to work? If I have the wx ui start cherrypy is that going to lock up the ui?
tehryan
  • 757
  • 3
  • 8
  • 14
7
votes
3 answers

CherryPy server name tag

When running a CherryPy app it will send server name tag something like CherryPy/version. Is it possible to rename/overwrite that from the app without modifying CherryPy so it will show something else? Maybe something like MyAppName/version…
daniels
  • 18,416
  • 31
  • 103
  • 173
7
votes
2 answers

how is cherrypy working? it handls requests well compared with tornado when concurrence is low

I carried out a test on cherrypy (using web.py as a framework) and tornado retrieving webpages from the internet. I have three test cases using siege to send requests to server (-c means number of users; -t is testing time). Code is below the test…
user1749075
  • 83
  • 2
  • 7
7
votes
1 answer

CherryPy interferes with Twisted shutting down on Windows

I've got an application that runs Twisted by starting the reactor with reactor.run() in my main thread after starting some other threads, including the CherryPy web server. Here's a program that shuts down cleanly when Ctrl+C is pressed on Linux…
Eli Courtwright
  • 186,300
  • 67
  • 213
  • 256
6
votes
1 answer

How do I set multiple cookies with CherryPy

From CherryPy documentation, there seems to be only one cookie slot. Here's my example code def sendCookie(self): cookie = cherrypy.response.cookie cookie['name'] = 'Chips Ahoy!' return 'Cookie is now in your hands.' sendCookie.exposed =…
Kit
  • 30,365
  • 39
  • 105
  • 149
6
votes
2 answers

Best practice for integrating CherryPy web-framework, SQLAlchemy sessions and lighttpd to serve a high-load webservice

I'm developing a CherryPy FastCGI server behind lighttpd with the following setup to enable using ORM SQLAlchemy sessions inside CherryPy controllers. However, when I run stress tests with 14 concurrent requests for about 500 loops, it starts to…
ento
  • 5,801
  • 6
  • 51
  • 69
6
votes
1 answer

Best Python framework for embedded system ( memory 64MB, HD 256MB)

I have one doubt. I need to write site on embedded system ( memory 64MB, HD 256MB ), I already have Python there and SQLite. I thought to use Django for this, but I heard that Django uses memory a lot. What framework is the best choice for me ( I…
Almira Bojani
  • 579
  • 2
  • 11
  • 19
6
votes
1 answer

Distinguishing between GET and POST data in CherryPy?

I've been deciding between Python web frameworks for a project of mine and I've really liked how lightweight, flexible, and concise CherryPy is compared to others. The only problem I'm having is I can't find any documentation on how to distinguish…
Patrick
  • 489
  • 6
  • 15
6
votes
4 answers

how to make sure the http response was delivered?

To respond a http request, we can just use return "content" in the method function. But for some mission-critical use cases, I would like to make sure the http 200 OK response was delivered. Any idea?
Kevin Kuei
  • 193
  • 2
  • 17
6
votes
4 answers

Is cherrypy Python3-compatible yet?

Does cherrypy support Python3 yet? What other web frameworks out there support Python 3?
user507220
6
votes
1 answer

can cherrypy receive multipart/mixed POSTs out of the box?

We're receiving some POST data of xml + arbitrary binary files (like images and audio) from a device that only gives us multipart/mixed encoding. I've setup a cherrypy upload/POST handler for our receiver end. I've managed to allow it to do…
dmyung
  • 7,959
  • 5
  • 27
  • 22
6
votes
2 answers

cherrypy and relative path in WSGI app

running cherrypy with mod_wsgi on apache along with another php app. The cherrypy app is NOT mounted on root, but rather on something like 'localhost/apps/myapp' via WSGIScriptAlias in the apache config file. In testapp.py, I have tried the…