Initial import to Tizen
[profile/ivi/python-twisted.git] / doc / web / examples / index.html
1 <?xml version="1.0" encoding="utf-8"?><!DOCTYPE html  PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN'  'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'><html lang="en" xmlns="http://www.w3.org/1999/xhtml">
2   <head>
3 <title>Twisted Documentation: Twisted Web code examples</title>
4 <link href="../howto/stylesheet.css" rel="stylesheet" type="text/css"/>
5   </head>
6
7   <body bgcolor="white">
8     <h1 class="title">Twisted Web code examples</h1>
9     <div class="toc"><ol><li><a href="#auto0">twisted.web.client</a></li><li><a href="#auto1">XML-RPC</a></li><li><a href="#auto2">Virtual hosts and proxies</a></li><li><a href="#auto3">.rpys and ResourceTemplate</a></li><li><a href="#auto4">Miscellaneous</a></li></ol></div>
10     <div class="content">
11     <span/>
12
13     <h2>twisted.web.client<a name="auto0"/></h2>
14     <ul>
15         <li><a href="getpage.py" shape="rect">getpage.py</a> - use
16         <code>twisted.web.client.getPage</code> to download a web
17         page.</li>
18         <li><a href="dlpage.py" shape="rect">dlpage.py</a> - add callbacks to
19         <code>twisted.web.client.downloadPage</code> to display errors
20         that occur when downloading a web page</li>
21     </ul>
22
23     <h2>XML-RPC<a name="auto1"/></h2>
24     <ul>
25         <li><a href="xmlrpc.py" shape="rect">xmlrpc.py</a> XML-RPC server with
26         several methods, including echoing, faulting, returning
27         deferreds and failed deferreds</li>
28         <li><a href="xmlrpcclient.py" shape="rect">xmlrpcclient.py</a> - use
29         <code>twisted.web.xmlrpc.Proxy</code> to call remote XML-RPC
30         methods</li>
31         <li><a href="advogato.py" shape="rect">advogato.py</a> - use
32         <code>twisted.web.xmlrpc</code> to post a diary entry to
33         advogato.org; requires an advogato account</li>
34     </ul>
35
36     <h2>Virtual hosts and proxies<a name="auto2"/></h2>
37     <ul>
38         <li><a href="proxy.py" shape="rect">proxy.py</a> -
39         use <code>twisted.web.proxy.Proxy</code> to make the simplest
40         proxy</li>
41         <li><a href="logging-proxy.py" shape="rect">logging-proxy.py</a> - example of
42         subclassing the core classes of <code>twisted.web.proxy</code>
43         to log requests through a proxy</li>
44         <li><a href="reverse-proxy.py" shape="rect">reverse-proxy.py</a> - use
45         <code>twisted.web.proxy.ReverseProxyResource</code> to make
46         any HTTP request to the proxy port get applied to a specified
47         website</li>
48         <li><a href="rootscript.py" shape="rect">rootscript.py</a> - example use of
49         <code>twisted.web.vhost.NameVirtualHost</code></li>
50         <li><a href="web.py" shape="rect">web.py</a> - an example of both using the
51         <code>processors</code> attribute to set how certain file types
52         are treated and using
53         <code>twisted.web.vhost.VHostMonsterResource</code> to reverse
54         proxy</li>
55     </ul>
56
57     <h2>.rpys and ResourceTemplate<a name="auto3"/></h2>
58     <ul>
59         <li><a href="hello.rpy.py" shape="rect">hello.rpy.py</a> - use
60         <code>twisted.web.static</code> to create a static resource to
61         serve</li>
62         <li><a href="fortune.rpy.py" shape="rect">fortune.rpy.py</a> - create a
63         resource that returns the output of a process run on the
64         server</li>
65         <li><a href="lj.rpy.py" shape="rect">lj.rpy.py</a> - use
66         <code>twisted.web.microdom</code>,
67         <code>twisted.web.domhelpers</code>, and chained callbacks to
68         extract and display parts of a livejournal user's rss page</li>
69         <li><a href="report.rpy.py" shape="rect">report.rpy.py</a> - display
70         various properties of a resource, including path, host, and
71         port</li>
72         <li><a href="users.rpy.py" shape="rect">users.rpy.py</a> - use
73         <code>twisted.web.distrib</code> to publish user directories
74         as for a &quot;community web site&quot;</li>
75         <li><a href="simple.rtl" shape="rect">simple.rtl</a> - example use of
76         <code>twisted.web.resource.ResourceTemplate</code></li>
77     </ul>
78
79     <h2>Miscellaneous<a name="auto4"/></h2>
80     <ul>
81         <li><a href="webguard.py" shape="rect">webguard.py</a> - pairing
82         <code>twisted.web</code> with <code>twisted.cred</code> to
83         guard resources against unauthenticated users</li>
84         <li><a href="silly-web.py" shape="rect">silly-web.py</a> - bare-bones
85         distributed web setup with a master and slave using
86         <code>twisted.web.distrib</code> and
87         <code>twisted.spread.pb</code></li>
88         <li><a href="google.py" shape="rect">google.py</a> - use
89         <code>twisted.web.google</code> to get the I'm Feeling Lucky
90         page for a search term</li>
91         <li><a href="soap.py" shape="rect">soap.py</a> - use
92         <code>twisted.web.soap</code> to publish SOAP methods</li>
93     </ul>
94
95 </div>
96
97     <p><a href="../howto/index.html">Index</a></p>
98     <span class="version">Version: 12.1.0</span>
99   </body>
100 </html>