Skip to main content
Help us improve Python packaging – donate today!

lightweight event loop

Project Description

simple event loop
========================
simple eventloop

Examples
========
```
import sys
import sevent

loop = sevent.instance()


def on_connect(s):
print 'on_connect'
s.write('GET / HTTP/1.0\r\nHost: www.google.com\r\nConnection: Close\r\n\r\n')


def on_data(s, data):
print 'on_data'
print data

def on_end(s):
print 'on_end'

def on_close(s):
print 'on_close'
loop.stop()


def on_error(s, e):
print 'on_error'
print e

s = sevent.tcp.Socket()
s.on('connect', on_connect)
s.on('data', on_data)
s.on('end', on_end)
s.on('close', on_close)
s.on('error', on_error)
s.connect(('www.google.com', 80))

loop.start()
```

Release history Release notifications

This version
History Node

0.0.2

History Node

0.0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
sevent-0.0.2.tar.gz (10.7 kB) Copy SHA256 hash SHA256 Source None May 20, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page