Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Embedded Web Server in Python? [closed]

Can you recommend a minimalistic python webserver that I can embedded in my Desktop Application.

like image 877
Ankur Gupta Avatar asked Nov 19 '08 17:11

Ankur Gupta


3 Answers

How minimalistic and for what purpose?

SimpleHTTPServer comes free as part of the standard Python libraries.

If you need more features, look into CherryPy or (at the top end) Twisted.

like image 111
Tim Lesher Avatar answered Nov 18 '22 22:11

Tim Lesher


I'm becoming a big fan of the newly released circuits library. It's a component/event framework that comes with a very nice set of packages for creating web servers & apps. Here's the simple web example from the site:

from circuits.lib.web import Server, Controller

class HelloWorld(Controller):
   def index(self):
      return "Hello World!"

server = Server(8000)
server += HelloWorld()
server.run()

Its WSGI support is no more complicated than that, either. Good stuff.

like image 25
Matthew Trevor Avatar answered Nov 18 '22 23:11

Matthew Trevor


If you're doing a lot of concurrent stuff, you might consider Kamaelia's HTTPServer.

like image 4
Jason Baker Avatar answered Nov 19 '22 00:11

Jason Baker