<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Features — Paste 1.7.5.1 documentation</title> <link rel="stylesheet" href="_static/default.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: './', VERSION: '1.7.5.1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <link rel="top" title="Paste 1.7.5.1 documentation" href="index.html" /> <link rel="next" title="Python Paste Developer Guide" href="DeveloperGuidelines.html" /> <link rel="prev" title="The Paste HTTP Server Thread Pool" href="paste-httpserver-threadpool.html" /> <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9"> <link rel="stylesheet" type="text/css" href="_static/paste.css.html"> </head> <body role="document"> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> <div class="section" id="features"> <h1>Features<a class="headerlink" href="#features" title="Permalink to this headline">¶</a></h1> <div class="section" id="testing"> <h2>Testing<a class="headerlink" href="#testing" title="Permalink to this headline">¶</a></h2> <ul class="simple"> <li>A fixture for testing WSGI applications conveniently and in-process, in <code class="xref py py-class docutils literal"><span class="pre">paste.fixture.TestApp</span></code></li> <li>A fixture for testing command-line applications, also in <code class="xref py py-class docutils literal"><span class="pre">paste.fixture.TestFileEnvironment</span></code></li> <li>Check components for WSGI-compliance in <code class="xref py py-mod docutils literal"><span class="pre">paste.lint</span></code></li> <li>Check filesystem changes, with <code class="xref py py-mod docutils literal"><span class="pre">paste.debug.fsdiff</span></code></li> </ul> </div> <div class="section" id="server"> <h2>Server<a class="headerlink" href="#server" title="Permalink to this headline">¶</a></h2> <ul class="simple"> <li>A threaded HTTP server in <code class="xref py py-mod docutils literal"><span class="pre">paste.httpserver</span></code></li> <li>A tool for seeing and killing errant threads in the HTTP server, in <code class="xref py py-mod docutils literal"><span class="pre">paste.debug.watchthreads</span></code></li> </ul> </div> <div class="section" id="dispatching"> <h2>Dispatching<a class="headerlink" href="#dispatching" title="Permalink to this headline">¶</a></h2> <ul class="simple"> <li>Chain and cascade WSGI applications (returning the first non-error response) in <code class="xref py py-mod docutils literal"><span class="pre">paste.cascade</span></code></li> <li>Dispatch to several WSGI applications based on URL prefixes, in <code class="xref py py-mod docutils literal"><span class="pre">paste.urlmap</span></code></li> <li>Allow applications to make subrequests and forward requests internally, in <code class="xref py py-mod docutils literal"><span class="pre">paste.recursive</span></code></li> <li>Redirect error pages (e.g., 404 Not Found) to custom error pages, in <code class="xref py py-mod docutils literal"><span class="pre">paste.errordocument</span></code>.</li> </ul> </div> <div class="section" id="web-application"> <h2>Web Application<a class="headerlink" href="#web-application" title="Permalink to this headline">¶</a></h2> <ul class="simple"> <li>Easily deal with incoming requests and sending a response in <code class="xref py py-mod docutils literal"><span class="pre">paste.wsgiwrappers</span></code></li> <li>Work directly with the WSGI environment in <code class="xref py py-mod docutils literal"><span class="pre">paste.request</span></code></li> <li>Run CGI programs as WSGI applications in <code class="xref py py-mod docutils literal"><span class="pre">paste.cgiapp</span></code></li> <li>Traverse files and load WSGI applications from <code class="docutils literal"><span class="pre">.py</span></code> files (or static files), in <code class="xref py py-mod docutils literal"><span class="pre">paste.urlparser</span></code></li> <li>Serve static directories of files, also in <code class="xref py py-mod docutils literal"><span class="pre">paste.urlparser</span></code>; also serve using the Setuptools <code class="docutils literal"><span class="pre">pkg_resources</span></code> resource API.</li> <li>Proxy to other servers, treating external HTTP servers as WSGI applications, in <code class="xref py py-mod docutils literal"><span class="pre">paste.proxy</span></code>.</li> <li>Serve files (with support for <code class="docutils literal"><span class="pre">If-Modified-Since</span></code>, etc) in <code class="xref py py-mod docutils literal"><span class="pre">paste.fileapp</span></code></li> </ul> </div> <div class="section" id="tools"> <h2>Tools<a class="headerlink" href="#tools" title="Permalink to this headline">¶</a></h2> <ul class="simple"> <li>Catch HTTP-related exceptions (e.g., <code class="docutils literal"><span class="pre">HTTPNotFound</span></code>) and turn them into proper responses in <code class="xref py py-mod docutils literal"><span class="pre">paste.httpexceptions</span></code></li> <li>Manage HTTP header fields with <code class="xref py py-mod docutils literal"><span class="pre">paste.httpheaders</span></code></li> <li>Handle authentication/identification of requests in <code class="xref py py-mod docutils literal"><span class="pre">paste.auth</span></code></li> <li>Create sessions in <code class="xref py py-mod docutils literal"><span class="pre">paste.session</span></code> and <code class="xref py py-mod docutils literal"><span class="pre">paste.flup_session</span></code></li> <li>Gzip responses in <code class="xref py py-mod docutils literal"><span class="pre">paste.gzipper</span></code></li> <li>A wide variety of routines for manipulating WSGI requests and producing responses, in <code class="xref py py-mod docutils literal"><span class="pre">paste.request</span></code>, <code class="xref py py-mod docutils literal"><span class="pre">paste.response</span></code> and <code class="xref py py-mod docutils literal"><span class="pre">paste.wsgilib</span></code>.</li> <li>Create Apache-style logs in <code class="xref py py-mod docutils literal"><span class="pre">paste.translogger</span></code></li> <li>Handy request and response wrappers in <code class="xref py py-mod docutils literal"><span class="pre">paste.wsgiwrappers</span></code></li> <li>Handling of request-local module globals sanely in <code class="xref py py-mod docutils literal"><span class="pre">paste.registry</span></code></li> </ul> </div> <div class="section" id="authentication"> <h2>Authentication<a class="headerlink" href="#authentication" title="Permalink to this headline">¶</a></h2> <ul class="simple"> <li>Authentication using cookies in <code class="xref py py-mod docutils literal"><span class="pre">paste.auth.cookie</span></code> and <code class="xref py py-mod docutils literal"><span class="pre">paste.auth.auth_tkt</span></code>; login form in <code class="xref py py-mod docutils literal"><span class="pre">paste.auth.form</span></code></li> <li>Authentication using <a class="reference external" href="http://openid.net/">OpenID</a> in <code class="xref py py-mod docutils literal"><span class="pre">paste.auth.open_id</span></code>, using <a class="reference external" href="http://www.ja-sig.org/products/cas/">CAS</a> in <code class="xref py py-mod docutils literal"><span class="pre">paste.auth.cas</span></code></li> <li>HTTP authentication in <code class="xref py py-mod docutils literal"><span class="pre">paste.auth.basic</span></code> and <code class="xref py py-mod docutils literal"><span class="pre">paste.auth.digest</span></code></li> <li>Dispatch to different authentication methods based on User-Agent, in <code class="xref py py-mod docutils literal"><span class="pre">paste.auth.multi</span></code></li> <li>Grant roles based on IP addresses, in <code class="xref py py-mod docutils literal"><span class="pre">paste.auth.grantip</span></code></li> </ul> </div> <div class="section" id="debugging-filters"> <h2>Debugging Filters<a class="headerlink" href="#debugging-filters" title="Permalink to this headline">¶</a></h2> <ul class="simple"> <li>Catch (optionally email) errors with extended tracebacks (using Zope/ZPT conventions) in <code class="xref py py-mod docutils literal"><span class="pre">paste.exceptions</span></code></li> <li>During debugging, show tracebacks with information about each stack frame, including an interactive prompt that runs in the individual stack frames, in <code class="xref py py-mod docutils literal"><span class="pre">paste.evalexception</span></code>.</li> <li>Catch errors presenting a <a class="reference external" href="http://python.org/doc/current/lib/module-cgitb.html">cgitb</a>-based output, in <code class="xref py py-mod docutils literal"><span class="pre">paste.cgitb_catcher</span></code>.</li> <li>Profile each request and append profiling information to the HTML, in <code class="xref py py-mod docutils literal"><span class="pre">paste.debug.profile</span></code></li> <li>Capture <code class="docutils literal"><span class="pre">print</span></code> output and present it in the browser for debugging, in <code class="xref py py-mod docutils literal"><span class="pre">paste.debug.prints</span></code></li> <li>Validate all HTML output from applications using the <a class="reference external" href="http://www.htmlhelp.com/tools/validator/">WDG Validator</a>, appending any errors or warnings to the page, in <code class="xref py py-mod docutils literal"><span class="pre">paste.debug.wdg_validator</span></code></li> </ul> </div> <div class="section" id="other-tools"> <h2>Other Tools<a class="headerlink" href="#other-tools" title="Permalink to this headline">¶</a></h2> <ul class="simple"> <li>A file monitor to allow restarting the server when files have been updated (for automatic restarting when editing code) in <code class="xref py py-mod docutils literal"><span class="pre">paste.reloader</span></code></li> <li>A class for generating and traversing URLs, and creating associated HTML code, in <code class="xref py py-mod docutils literal"><span class="pre">paste.url</span></code></li> <li>A small templating language (for internal use) in <code class="xref py py-mod docutils literal"><span class="pre">paste.util.template</span></code></li> <li>A class to help with loops in templates, in <code class="xref py py-mod docutils literal"><span class="pre">paste.util.looper</span></code></li> <li>Import modules and objects given a string, in <code class="xref py py-mod docutils literal"><span class="pre">paste.util.import_string</span></code></li> <li>Ordered dictionary that can have multiple values with the same key, in <code class="xref py py-mod docutils literal"><span class="pre">paste.util.multidict</span></code></li> </ul> </div> </div> </div> </div> </div> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="sphinxsidebarwrapper"> <h3><a href="http://pythonpaste.org/" class="invisible-link">Python Paste</a></h3> <ul> <li><a href="https://bitbucket.org/ianb/pastescript/issues/">Issue tracker</a></li> <li><a href="http://pythonpaste.org/">Paste core</a></li> <li><a href="http://webob.org/">WebOb</a></li> <li><a href="http://pythonpaste.org/deploy/">Paste Deploy</a></li> <li><a href="http://pythonpaste.org/script/">Paste Script</a></li> <li><a href="http://webtest.pythonpaste.org/">WebTest</a></li> <li><a href="http://pythonpaste.org/scripttest/">ScriptType</a></li> <li><a href="http://pythonpaste.org/initools/">INITools</a></li> <li><a href="http://pythonpaste.org/tempita/">Tempita</a></li> <li><a href="http://pythonpaste.org/waitforit/">WaitForIt</a></li> <li><a href="http://pythonpaste.org/wphp/">WPHP</a></li> <li><a href="http://pythonpaste.org/wsgifilter/">WSGIFilter</a></li> <li><a href="http://pythonpaste.org/wsgiproxy/">WSGIProxy</a></li> </ul> <h3><a href="index.html">Table Of Contents</a></h3> <ul> <li><a class="reference internal" href="#">Features</a><ul> <li><a class="reference internal" href="#testing">Testing</a></li> <li><a class="reference internal" href="#server">Server</a></li> <li><a class="reference internal" href="#dispatching">Dispatching</a></li> <li><a class="reference internal" href="#web-application">Web Application</a></li> <li><a class="reference internal" href="#tools">Tools</a></li> <li><a class="reference internal" href="#authentication">Authentication</a></li> <li><a class="reference internal" href="#debugging-filters">Debugging Filters</a></li> <li><a class="reference internal" href="#other-tools">Other Tools</a></li> </ul> </li> </ul> <div class="relations"> <h3>Related Topics</h3> <ul> <li><a href="index.html">Documentation overview</a><ul> <li>Previous: <a href="paste-httpserver-threadpool.html" title="previous chapter">The Paste HTTP Server Thread Pool</a></li> <li>Next: <a href="DeveloperGuidelines.html" title="next chapter">Python Paste Developer Guide</a></li> </ul></li> </ul> </div> <div role="note" aria-label="source link"> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="_sources/developer-features.txt" rel="nofollow">Show Source</a></li> </ul> </div> <div id="searchbox" style="display: none" role="search"> <h3>Quick search</h3> <form class="search" action="search.html" method="get"> <input type="text" name="q" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> <p class="searchtip" style="font-size: 90%"> Enter search terms or a module, class or function name. </p> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="footer"> ©2008, Ian Bicking. | Powered by <a href="http://sphinx-doc.org/">Sphinx 1.3.1</a> & <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.6</a> | <a href="_sources/developer-features.txt" rel="nofollow">Page source</a> </div> </body> </html>