ANN: Snakelets 1.38 (simple-to-use web app server with dynamic pages)

I

Irmen de Jong

I'm happy to say that Snakelets 1.38 is available.

Snakelets is a very simple-to-use Python web application server.
This project provides a built-in threaded web server (so you don't
need to set up Apache or another web server), Ypages (HTML+Python
language, similar to Java's JSPs) and Snakelets: code-centric page
request handlers (similar to Java's Servlets).
Snakelets is fully unicode compatible and it's possible to run it
from a CD (read-only mode).

It's released under the open-source MIT Software license.

You can download from http://snakelets.sourceforge.net
(go to the SF project site, and then the file section).

A selection of the changes:

- Documentation cleanups and improvements, more info on Apache config.
- now requires at least Python 2.3 to run
- added 'smart suffix finder'
- fixed cookie removal problem, templated error page, and other smaller issues
- static asset and url convenience stuff
- documented static-file serving API (to facilitate download pages etc)
- directory lister is now a (server-)plugin
- new plugin distr corresponding with this new version
- many cleanups in the html pages


To start, edit the vhost config file (see docs) and
then run the serv.py script, or the monitor.py script
if you want to start it as a daemon (on Unix).

Enjoy,
--Irmen de Jong.


P.S. if you want to see it in action, visit http://www.razorvine.net/snake/
 
R

Roland Heiber

Irmen said:
I'm happy to say that Snakelets 1.38 is available.

Fine thing again! Maybe someone is interested in this:

I just tried tlslite and did a dirty hack so you could use snakelets via
SSL. See the patch below. Snip and save it, use it against
snakeserver/server.py.

You've to place a key-pair in your server-dir
(localhost.crt/localhost.private.key in the path). You can generate a
self-signed certificate easily with openssl.


HtH, Roland

----- SNIP AND SAVE BELOW -----
961d
927a

def handshake(self, tlsConnection):
try:
tlsConnection.handshakeServer(certChain=certChain,
privateKey=privateKey,
sessionCache=sessionCache)
tlsConnection.ignoreAbruptClose = True
return True
except (SyntaxError, TLSError), error:
print "Handshake failure:", str(error)
return False


..
908c
if IS_SSL:
tlsConnection = TLSConnection(request)
if self.handshake(tlsConnection) == True:
self.RequestHandlerClass(tlsConnection,
client_address, self)
tlsConnection.close()
else:
self.RequestHandlerClass(request, client_address, self)
..
889c
if IS_SSL:
tlsConnection = TLSConnection(request)
if self.handshake(tlsConnection) == True:
self.RequestHandlerClass(tlsConnection,
client_address, self)
tlsConnection.close()
else:
self.RequestHandlerClass(request, client_address, self)
..
21a
IS_SSL=True
try:
from tlslite.api import *
except ImportError:
IS_SSL=False

if IS_SSL:
s = open("./localhost.crt").read()
x509 = X509()
x509.parse(s)
certChain = X509CertChain([x509])

s = open("./localhost.private.key").read()
privateKey = parsePEMKey(s, private=True)

sessionCache = SessionCache()

..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,001
Messages
2,570,254
Members
46,850
Latest member
VMRKlaus8

Latest Threads

Top