From 2cd90437f80c1bccdd98da0eabbb526553f0c2fb Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Tue, 28 Jul 2009 18:14:30 -0700 Subject: [PATCH] Added a sorta-real index page, fixed docs to be 0.9 version (great, another place to update the version number). --- doc/conf.py | 6 +-- doc/real_index.html | 105 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+), 3 deletions(-) create mode 100644 doc/real_index.html diff --git a/doc/conf.py b/doc/conf.py index d7338e2..44a8f79 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -49,9 +49,9 @@ copyright = u'2009, ' # built documents. # # The short X.Y version. -version = '0.8' +version = '0.9' # The full version, including alpha/beta/rc tags. -release = '0.8' +release = '0.9pre' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -82,7 +82,7 @@ exclude_trees = ['_build'] # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. -#show_authors = False +show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' diff --git a/doc/real_index.html b/doc/real_index.html new file mode 100644 index 0000000..183b4a0 --- /dev/null +++ b/doc/real_index.html @@ -0,0 +1,105 @@ + + + + + + + Eventlet Networking Library + + + + + + +
+
+
+
+ +
+

Eventlet

+ +

Eventlet is a networking library written in Python. It achieves high scalability by using non-blocking io while at the same time retaining high programmer usability by using coroutines to make the non-blocking io operations appear blocking at the source code level.

+ +

Documentation

+ +API Documentation + +

Installation

+ +

To install eventlet, simply: +

+easy_install eventlet
+

+ +

Alternately, you can download the source tarball: +

+

+ +

Mailing List

+ +

eventletdev at lists.secondlife.com

+ +

This is a relatively low-traffic list about using and developing eventlet. Look through the archives for some useful information and possible answers to questions.

+ +

Development

+ +

"root" repository

+ +

We use Mercurial for our source control, hosted by BitBucket. It's easy to branch off the main repository and contribute patches, tests, and documentation back upstream.

+ +
+

Web Crawler ExampleΒΆ

+

This is a simple web “crawler” that fetches a bunch of urls using a coroutine pool. It has as much concurrency (i.e. pages being fetched simultaneously) as coroutines in the pool.

+
urls = ["http://www.google.com/intl/en_ALL/images/logo.gif",
+       "http://wiki.secondlife.com/w/images/secondlife.jpg",
+       "http://us.i1.yimg.com/us.yimg.com/i/ww/beta/y3.gif"]
+
+import time
+from eventlet import coros
+
+# this imports a special version of the urllib2 module that uses non-blocking IO
+from eventlet.green import urllib2
+
+def fetch(url):
+    print "%s fetching %s" % (time.asctime(), url)
+    data = urllib2.urlopen(url)
+    print "%s fetched %s" % (time.asctime(), data)
+
+pool = coros.CoroutinePool(max_size=4)
+waiters = []
+for url in urls:
+    waiters.append(pool.execute(fetch, url))
+
+# wait for all the coroutines to come back before exiting the process
+for waiter in waiters:
+    waiter.wait()
+
+
+
+
+
+
+
+
+
+ +
+ + + \ No newline at end of file