Sheared

Sheared is a library for network programming in Stackless Python. Where traditional network programming would uses threads or processes Sheared uses stackless tasklets, but all blocking operations go through a reactor tasklet. In this way the best of asynchronous (no resource locking to worry about) and synchronous (no need to split code into different call-backs at blocking operations, e.g. database queries) network programming is combined.

I have taken liberal amounts of inspiration from the Twisted crowd in writing Sheared, but luckily I have not yet caught the Framework Bug from them. Alas, since Sheared is presently a one-man project, Twisted is a much more mature project, and has many more features.

Currently Sheared has support for TCP and UNIX sockets (others supported in in the BSD sockets interface should be simple to support), and it comes with it's own web-server. Linux is the only platform known to be supported, but others with reasonable BSD-socket and select(2) implementations should work also.

So far Sheared has (to my knowledge :-) only been used in one publicly available project: Jukebox, my own MP3 streaming server with built-in web- and telnet-admin interfaces.

Sheared is licensed under the GNU General Public License, and is copyright © 2003 Sune Kirkeby.

Download

Go download it.