Browse files

+docs

  • Loading branch information...
1 parent 449aeab commit 31b0c663d935870d55f628cd6f944722084aebd7 @fiorix committed Jan 21, 2013
Showing with 139 additions and 97 deletions.
  1. +1 −1 demos/helloworld/helloworld_simple.py
  2. +138 −0 website/index.html
  3. +0 −28 website/templates/base.html
  4. +0 −68 website/templates/index.html
View
2 demos/helloworld/helloworld_simple.py
@@ -16,7 +16,7 @@
# under the License.
#
# Start the server:
-# cyclone run -r helloworld_simple.Application
+# cyclone run helloworld_simple.py
#
# For more info:
# cyclone run --help
View
138 website/index.html
@@ -0,0 +1,138 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>cyclone.io: The web server framework for Python</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="">
+
+ <link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css" rel="stylesheet">
+ <style type="text/css">
+ body {
+ padding-top: 20px;
+ padding-bottom: 40px;
+ }
+
+ /* Custom container */
+ .container-narrow {
+ margin: 0 auto;
+ max-width: 700px;
+ }
+ .container-narrow > hr {
+ margin: 30px 0;
+ }
+
+ /* Main marketing message and sign up button */
+ .jumbotron {
+ margin: 60px 0;
+ text-align: center;
+ }
+ .jumbotron h1 {
+ font-size: 72px;
+ line-height: 1;
+ }
+ .jumbotron .btn {
+ font-size: 21px;
+ padding: 14px 24px;
+ }
+
+ /* Supporting marketing content */
+ .marketing {
+ margin: 60px 0;
+ }
+ .marketing p + h4 {
+ margin-top: 28px;
+ }
+ </style>
+
+ <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
+ <!--[if lt IE 9]>
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+ </head>
+
+ <body>
+
+ <div class="container-narrow">
+
+ <div class="masthead">
+ <ul class="nav nav-pills pull-right">
+ <li class="active"><a href="/">Home</a></li>
+ <li><a href="/documentation">Documentation</a></li>
+ <li><a href="https://github.com/fiorix/cyclone">GitHub Repository</a></li>
+ </ul>
+ <h3 class="muted">cyclone.io</h3>
+ </div>
+
+ <hr>
+
+ <p><a href="https://github.com/fiorix/cyclone">Cyclone</a> is a web server framework
+ for Python, that implements the Tornado API as a Twisted protocol.</p>
+
+ <p><a href="http://twistedmatrix.com">Twisted</a> is an event-driven network programming
+ framework for Python, that dates back from 2002. It&#8217;s one of the most mature
+ libraries for non-blocking I/O available to the public.
+ <a href="http://tornadoweb.org">Tornado</a> is the open source version of FriendFeed&#8217;s
+ web server, one of the most popular and fast web servers for Python, with
+ a very decent API for building web applications.</p>
+
+ <p>The idea is that applications built with Cyclone look like Tornado, which is
+ a very nice and straightforward way of structuring web applications, but
+ on the other hand leverage all protocols supported by twisted.</p>
+
+ <p>This combination provides the ground for building up hybrid servers that not
+ only can handle http clients very efficiently, but also serve or use e-mail,
+ ssh, sip, irc, etc, all concurrently.</p>
+
+ <p>Besides the rich feature set, there&#8217;s also an effort for addressing the C10K
+ problem. For more information check <a class="reference external" href="http://www.kegel.com/c10k.html">http://www.kegel.com/c10k.html</a>.</p>
+
+ <div class="row-fluid marketing">
+ <div class="span6">
+ <h4>Hello, world</h4>
+ <p>Pick <a href="http://tornadoweb.org">Tornado</a> or
+ <a href="http://bottlepy.org">Bottle</a> application styles.
+ <a href="https://github.com/fiorix/cyclone/tree/master/demos/helloworld">helloworld.py</a></p>
+
+ <h4>Translatable</h4>
+ <p>Check out the <a href="https://github.com/fiorix/cyclone/tree/master/demos/locale">locale demo</a>,
+ amigo.</p>
+
+ <h4>E-mail, with attachments</h4>
+ <p>SMTP on plain text, SSL or TLS:
+ <a href="https://github.com/fiorix/cyclone/tree/master/demos/email">email demo</a></p>
+
+ </div>
+
+ <div class="span6">
+ <h4>+Web</h4>
+ <p>Built-in <a href="https://github.com/fiorix/cyclone/tree/master/demos/rpc">XML-RPC and JSON-RPC</a>,
+ <a href="https://github.com/fiorix/cyclone/tree/master/demos/sse">Server-sent Events</a> and
+ <a href="https://github.com/fiorix/cyclone/tree/master/demos/websocket">WebSocket</a>.</p>
+
+ <h4>HTTPS</h4>
+ <p>Out of the box: <a href="https://github.com/fiorix/cyclone/tree/master/demos/ssl">SSL demo</a></p>
+
+ <h4>OpenID and OAuth</h4>
+ <p>Support for
+ <a href="/documentation/auth.html#twitter">Twitter</a>,
+ <a href="/documentation/auth.html#friendfeed">FriendFeed</a>,
+ <a href="/documentation/auth.html#google">Google</a> and
+ <a href="/documentation/auth.html#facebook">Facebook</a> APIs.</p>
+ </div>
+ </div>
+
+ <hr>
+
+ <footer>
+ <p>&copy; 2013 <a href="https://github.com/fiorix">fiorix</a></p>
+ </footer>
+
+ </div> <!-- /container -->
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
+ <script src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/js/bootstrap.min.js"></script>
+
+ </body>
+</html>
View
28 website/templates/base.html
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <title>{% block title %}Tornado Web Server{% end %}</title>
- <link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon" />
- <link rel="stylesheet" href="/static/base.css" type="text/css"/>
- {% block head %}{% end %}
- </head>
- <body>
- <div id="body">
- <div id="header">
- <table>
- <tr>
- <td class="logo"><a href="/"><img src="/static/tornado.png" alt="Tornado"/></a></td>
- <td class="title">{% block headertitle %}{% end %}</td>
- </tr>
- </table>
- </div>
- <div id="content">{% block body %}{% end %}</div>
- <div id="footer">
- <div>Tornado is one of <a href="http://developers.facebook.com/opensource/">Facebook's open source technologies</a>. It is available under the <a href="http://www.apache.org/licenses/LICENSE-2.0.html">Apache Licence, Version 2.0</a>.</div>
- <div>This web site and all documentation is licensed under <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons 3.0</a>.</div>
- </div>
- </div>
- {% block bottom %}{% end %}
- </body>
-</html>
View
68 website/templates/index.html
@@ -1,68 +0,0 @@
-{% extends "base.html" %}
-
-{% block body %}
- <p><a href="http://www.tornadoweb.org/">Tornado</a> is an open source version of the scalable, non-blocking web server and tools that power <a href="http://friendfeed.com/">FriendFeed</a>. The FriendFeed application is written using a web framework that looks a bit like <a href="http://webpy.org/">web.py</a> or <a href="http://code.google.com/appengine/docs/python/tools/webapp/">Google's webapp</a>, but with additional tools and optimizations to take advantage of the underlying non-blocking infrastructure.</p>
- <p>The framework is distinct from most mainstream web server frameworks (and certainly most Python frameworks) because it is non-blocking and reasonably fast. Because it is non-blocking and uses <a href="http://www.kernel.org/doc/man-pages/online/pages/man4/epoll.4.html"><code>epoll</code></a> or <code>kqueue</code>, it can handle thousands of simultaneous standing connections, which means it is ideal for real-time web services. We built the web server specifically to handle FriendFeed's real-time features &mdash; every active user of FriendFeed maintains an open connection to the FriendFeed servers. (For more information on scaling servers to support thousands of clients, see The <a href="http://www.kegel.com/c10k.html">C10K problem</a>.)</p>
-
- <h2>Upgrading from Tornado 1.x</h2>
-
- <p>Tornado 2.0 introduces several potentially backwards-incompatible changes,
- including in particular automatic escaping of template output. Users
- who are upgrading from Tornado 1.x should see the
- <a href="/documentation/releases/v2.0.0.html">release notes</a> for
- information about backwards compatibility.</p>
-
- <h2>Quick links</h2>
-
- <ul>
- <li><a href="/documentation/index.html">Documentation</a></li>
- <li><a href="https://github.com/downloads/facebook/tornado/tornado-{{version}}.tar.gz">Download version {{version}}</a> (<a href="/documentation/releases.html">release notes</a>)</li>
- <li><a href="https://github.com/facebook/tornado">Source (github)</a></li>
- <li><a href="http://groups.google.com/group/python-tornado">Mailing list</a></li>
- <li><a href="https://github.com/facebook/tornado/wiki/Links">Wiki</a></li>
- </ul>
-
- <h2>Hello, world</h2>
- <p>Here is the canonical &quot;Hello, world&quot; example app for Tornado:</p>
- <pre><code>import tornado.ioloop
-import tornado.web
-
-class MainHandler(tornado.web.RequestHandler):
- def get(self):
- self.write("Hello, world")
-
-application = tornado.web.Application([
- (r"/", MainHandler),
-])
-
-if __name__ == "__main__":
- application.listen(8888)
- tornado.ioloop.IOLoop.instance().start()</code></pre>
- <p>See the <a href="/documentation/index.html">Tornado documentation</a> for a detailed walkthrough of the framework.</p>
-
- <h2>Installation</h2>
-
- <p><b>Automatic installation:</b> Tornado is listed in <a href="http://pypi.python.org/pypi/tornado">PyPI</a> and can be installed with <code>pip</code> or <code>easy_install</code>. Note that the source distribution includes demo applications that are not present when Tornado is installed in this way, so you may wish to download a copy of the source tarball as well.</p>
-
- <p><b>Manual installation:</b> Download <a href="https://github.com/downloads/facebook/tornado/tornado-{{version}}.tar.gz">tornado-{{version}}.tar.gz</a></p>
- <pre><code>tar xvzf tornado-{{version}}.tar.gz
-cd tornado-{{version}}
-python setup.py build
-sudo python setup.py install</code></pre>
- <p>The Tornado source code is <a href="https://github.com/facebook/tornado">hosted on GitHub</a>. On Python 2.6 and 2.7, it is also possible to simply add the tornado directory to your <code>PYTHONPATH</code> instead of building with <code>setup.py</code>, since the standard library includes <code>epoll</code> support.</p>
-
- <p><b>Prerequisites:</b> Tornado runs on Python 2.5, 2.6, 2.7 and 3.2.
- <ul>
- <li>On Python 2.6 and 2.7, there are no dependencies outside the Python standard library, although <a href="http://pycurl.sourceforge.net/">PycURL</a> (version 7.18.2 or higher required; version 7.21.1 or higher recommended) may be used if desired.</li>
- <li>On Python 2.5, PycURL is required, along with <a href="http://pypi.python.org/pypi/simplejson/">simplejson</a> and the Python development headers (typically obtained by installing a package named something like <code>python-dev</code> from your operating system).</li>
- <li>On Python 3.2, the <a href="http://pypi.python.org/pypi/distribute">distribute</a> package is required. Note that Python 3 support is relatively new and may have bugs.</li>
- </ul></p>
-
- <p><b>Platforms:</b> Tornado should run on any Unix-like platform, although
- for the best performance and scalability only Linux and BSD (including
- BSD derivatives like Mac OS X) are recommended.</p>
-
- <h2>Discussion and support</h2>
- <p>You can discuss Tornado and report bugs on <a href="http://groups.google.com/group/python-tornado">the Tornado developer mailing list</a>. Links to additional resources can be found on the <a href="https://github.com/facebook/tornado/wiki/Links">Tornado wiki</a>.
-
-{% end %}

0 comments on commit 31b0c66

Please sign in to comment.