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
-1
votes
1 answer

sql execution time is more if the param string is unicode

I am using cherrypy to handle get requests that pass a input parameter (basically a 32 bit string) and I use this 32 bit string to query a table in database. I observed that by default the string is in unicode and the queries takes more than 2…
andor
  • 75
  • 8
-1
votes
1 answer

Using cherrypy.lib.sessions.expire

My cherrypy class definition includes the method: @cherrypy expose def quit(self) cherrypy.lib.sessions.expire(self) return "Session closed" My goal is to reset the current session. However, this function call returns "Missing module name".…
Tsf
  • 1,339
  • 5
  • 17
  • 29
-1
votes
1 answer

Cherrypy Basic Authorization in header -

I've reviewed the documentation at http://cherrypy.readthedocs.io/en/latest/basics.html#authentication in order to understand how to send my API call to Cherrypy and validate an API key that I'll have in the header of the HTTP request that I'll send…
ElliotB
  • 153
  • 2
  • 8
-1
votes
1 answer

Python and JSON(very long file)

I've searched on forum, I have seen a lot of discussions about it but nothing was so specific. So I have a very long json file and I want to load it in python as dictionary, not list. You can see the file here…
-1
votes
1 answer

Cherrypy render new jinja2 page after login

I have an application that I want to put behind a login page. I receive login information through ajax on the login page I load, then I want to load some data based on the user and render them a new page. I'm also using jinja2 to render javascript…
Hal T
  • 527
  • 7
  • 22
-1
votes
1 answer

Insert query for mysql databse for datetime data type in cherrypy

Here is my insert query which is working correctly, db = MySQLdb.connect(host="localhost",user="root",passwd="", db="databseFile") cur = db.cursor() print "source_id is: ",srcId[0] cur.execute('INSERT into config(col_1,col_2)…
ujjawl saini
  • 133
  • 3
  • 15
-1
votes
1 answer

iterating a single item list faster than iterating a long string? #Python #Cherrypy

When using Cherrypy, I ran into this comment line. "strings get wrapped in a list because iterating over a single item list is much faster than iterating over every character in a long string." This is located at…
JoeyZhao
  • 514
  • 5
  • 12
-1
votes
1 answer

use json in cherrpy

I am new to creating API's in cherrypy.So,I am just making a simple API to add numbers and display the answer. I used this : import cherrypy import json def add(b,c): return a+b class addition: exposed = True …
-1
votes
1 answer

Getting value from a dropBox using Cherrypy in Python

I am new to Cherrypy, Kindly help me how can I get the selected value from dropdown using cherrypy in python.
Deepa Huddar
  • 321
  • 1
  • 4
  • 15
-1
votes
1 answer

Cherrypy issue on updating list

I have a script that use CherryPy. The script is working well and the HTML page is ok. On the HTML page I'm showing the content of one list (is only an exercise for learning). Even this is working but If I try to put a background color based on the…
user2174050
  • 65
  • 1
  • 2
  • 10
-1
votes
2 answers

CherryPy: Perform specific action if user goes to specific URL

I'm new to CherryPy so please bear with me. What I'd like to do is perform a specific action when a user goes to a specific URL. The URL will mostly always be the same except for one part. The URL will be something like:…
darksideofthesun
  • 601
  • 2
  • 9
  • 19
-1
votes
1 answer

Cherrypy Behind University Apache Server

I have an application that I had created with Cherrypy and now I got a folder path to locate my scripts inside \\rus4ias.ias.uni-stuttgart.de\websonne\infoscreen and a link for my application is here . When I visit the page I see that it written…
-1
votes
2 answers

Python: deferToThread XMLRPC Server - Twisted - Cherrypy?

This question is related to others I have asked on here, mainly regarding sorting huge sets of data in memory. Basically this is what I want / have: Twisted XMLRPC server running. This server keeps several (32) instances of Foo class in memory. …
sberry
  • 128,281
  • 18
  • 138
  • 165
-1
votes
2 answers

To make form tag with submit doesn't open a new page/window

So, there is an ordinary example of form tag usage:
`
Dmitriy_Cert
  • 157
  • 1
  • 12
-1
votes
2 answers

How to remove u is indicating that the strings are unicode

I want to replace the character "u '" with "'" and I find on google the solutions. I have this version of python: user@ubuntu:/media/DATA/prototi/prototypefin4$ python --version Python 2.7.4 I try for replace and info: strg = jsondict.replace("u'",…
1 2 3
91
92