diff options
| author | ianb <devnull@localhost> | 2005-04-22 03:11:58 +0000 |
|---|---|---|
| committer | ianb <devnull@localhost> | 2005-04-22 03:11:58 +0000 |
| commit | 7752a3102fc8aa68ee7e349495bc2e9345c77c00 (patch) | |
| tree | 7896dd31404fdfbba44d9c0338a7c1ae8e4ad5f8 /docs | |
| parent | 4431828c677e6104b7abc62b31a933d2793ff6cf (diff) | |
| download | paste-7752a3102fc8aa68ee7e349495bc2e9345c77c00.tar.gz | |
Internal renaming of wsgikit->paste
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/BlogTutorial.txt | 15 | ||||
| -rw-r--r-- | docs/DeveloperGuidelines.txt | 14 | ||||
| -rw-r--r-- | docs/StyleGuide.txt | 2 | ||||
| -rw-r--r-- | docs/TodoTutorial.txt | 27 | ||||
| -rw-r--r-- | docs/WSGIKit.txt | 30 | ||||
| -rw-r--r-- | docs/servers.txt | 28 | ||||
| -rw-r--r-- | docs/web/index.txt | 36 |
7 files changed, 73 insertions, 79 deletions
diff --git a/docs/BlogTutorial.txt b/docs/BlogTutorial.txt index 0336a3d..735652f 100644 --- a/docs/BlogTutorial.txt +++ b/docs/BlogTutorial.txt @@ -12,13 +12,12 @@ Introduction ============ This tutorial will go through the process of creating a blog using -WSGIKit_, SQLObject_, and `Zope Page Templates`_. This blog will rely -heavily on static publishing -- that is, when at all possible flat -HTML pages will be written to disk. For some parts (e.g., posting a -new item) this will of course be infeasible, but for most of the site -this should work fine. +`Python Paste <http://pythonpaste.org>`_, SQLObject_, and `Zope Page +Templates`_. This blog will rely heavily on static publishing -- that +is, when at all possible flat HTML pages will be written to disk. For +some parts (e.g., posting a new item) this will of course be +infeasible, but for most of the site this should work fine. -.. _WSGIKit: http://wsgikit.org .. _SQLObject: http://sqlobject.org .. _Zope Page Templates: http://www.zope.org/DevHome/Wikis/DevSite/Projects/ZPT/FrontPage @@ -47,7 +46,7 @@ Setting Up The App .. run: - from wsgikit.tests.doctest_webapp import * + from paste.tests.doctest_webapp import * BASE = '/var/www/wkblog' import sys clear_dir(BASE) @@ -57,7 +56,7 @@ Setting Up The App :: - $ export PYTHONPATH=/path/to/WSGIKit:$PYTHONPATH + $ export PYTHONPATH=/path/to/Paste:$PYTHONPATH $ BASE=/var/www/wkblog $ app-setup create --template=webkit_zpt $BASE $ cd $BASE diff --git a/docs/DeveloperGuidelines.txt b/docs/DeveloperGuidelines.txt index 8ff8122..f8388d4 100644 --- a/docs/DeveloperGuidelines.txt +++ b/docs/DeveloperGuidelines.txt @@ -1,10 +1,10 @@ -+++++++++++++++++++++++ -WSGIKit Developer Guide -+++++++++++++++++++++++ +++++++++++++++++++++++++++++ +Python Paste Developer Guide +++++++++++++++++++++++++++++ -Hi. Welcome to WSGIKit. I hope you enjoy your stay here. +Hi. Welcome to Paste. I hope you enjoy your stay here. -I hope to bring together multiple efforts here, for WSGIKit to support +I hope to bring together multiple efforts here, for Paste to support multiple frameworks and directions, while presenting a fairly integrated frontend to users. How to do that? That's an open question, and this code is in some ways an exploration. @@ -25,7 +25,7 @@ There's some basic principles: * Entry into frameworks should be easy, but exit should also be easy. Heterogeneous frameworks and applications are the ambition. But we - have to get some messiness into WSGIKit before we can try to resolve + have to get some messiness into Paste before we can try to resolve that messiness. * When all is said and done, users should be able to ignore much of @@ -53,7 +53,7 @@ is going to bite your head off for committing something. but please feel free to use those too. ``unittest`` is kind of annoying, and py.test is both more powerful and easier to write for. Tests should go in a ``tests/`` subdirectory. - ``wsgikit.tests.fixture`` contains some convenience functions for + ``paste.tests.fixture`` contains some convenience functions for testing WSGI applications and middleware. .. _py.test: http://codespeak.net/py/current/doc/test.html diff --git a/docs/StyleGuide.txt b/docs/StyleGuide.txt index 523fa61..5f5cf60 100644 --- a/docs/StyleGuide.txt +++ b/docs/StyleGuide.txt @@ -1,5 +1,5 @@ +++++++++++++++++++ -WSGIKit Style Guide +Paste Style Guide +++++++++++++++++++ Generally you should follow the recommendations in `PEP 8`_, the diff --git a/docs/TodoTutorial.txt b/docs/TodoTutorial.txt index dc525d9..3f1ce07 100644 --- a/docs/TodoTutorial.txt +++ b/docs/TodoTutorial.txt @@ -11,7 +11,7 @@ To-Do: A Tutorial .. comment (about this document) This document is meant to be processed with - wsgikit/tests/doctest_webapp.py, which assembles the file and + paste/tests/doctest_webapp.py, which assembles the file and provides a degree of testing. The pages inlined aren't current tested, and so must be inspected by eye after the document is assembled. @@ -20,12 +20,11 @@ Introduction ============ This is a tutorial for building a simple to-do list application using -WSGIKit_, SQLObject_, and `Zope Page Templates`_. You can view the +`Python Paste <http://pythonpaste.org>`_, SQLObject_, and `Zope Page Templates`_. You can view the completed application in the repository at ``examples/todo_sql`` or view the repository online at -http://svn.w4py.org/WSGIKit/trunk/examples/todo_sql/ +http://svn.w4py.org/Paste/trunk/examples/todo_sql/ -.. _WSGIKit: http://wsgikit.org .. _SQLObject: http://sqlobject.org .. _Zope Page Templates: http://www.zope.org/DevHome/Wikis/DevSite/Projects/ZPT/FrontPage @@ -43,7 +42,7 @@ Setting up the files .. comment (setup doctests) - >>> from wsgikit.tests.doctest_webapp import * + >>> from paste.tests.doctest_webapp import * Let's start out quickly. We'll be installing the application in ``/var/www/todo_sql``: @@ -52,7 +51,7 @@ Let's start out quickly. We'll be installing the application in >>> BASE = '/var/www/todo_sql' >>> import sys - >>> sys.path.append('/path/to/WSGIKit') + >>> sys.path.append('/path/to/Paste') >>> clear_dir(BASE) >>> run("app-setup create --template=webkit_zpt %s" % BASE) >>> os.chdir(BASE) @@ -72,7 +71,7 @@ Let's start out quickly. We'll be installing the application in :: - $ export PYTHONPATH=/path/to/WSGIKit:$PYTHONPATH + $ export PYTHONPATH=/path/to/Paste:$PYTHONPATH $ BASE=/var/www/todo_sql $ app-setup create --template=webkit_zpt $BASE $ cd $BASE @@ -147,7 +146,7 @@ nature of the files. ``web/index.py``: This is a simple example servlet. Anything named ``index`` is - also used as the default page (like ``index.html``). WSGIKit + also used as the default page (like ``index.html``). Paste mostly ignores extensions when finding pages, so ``/index`` can refer to ``index.py``, ``index.html``, or any other page named ``index`` regardless of extension. @@ -155,7 +154,7 @@ nature of the files. ``web/static/``: This contains files that don't have any dynamic content, like images and Javascript. Based on deployment, these files could be - served up by Apache or another web server without WSGIKit being + served up by Apache or another web server without Paste being involved at all (with some CPU savings), so we keep them separated. @@ -169,7 +168,7 @@ Running the application It's just the barest example application, but we can still run it and get some basic output. Change into the directory and run:: - $ path/to/wsgikit/scripts/wsgi-server + $ path/to/paste/scripts/wsgi-server This will run a server on http://localhost:8080 @@ -196,7 +195,7 @@ localhost:8080. Looking at servlets ------------------- -The idea of a servlet in WSGIKit is taken from Java, but the +The idea of a servlet in Paste is taken from Java, but the similarity isn't that great. Let's look at the ``index.py`` servlet we showed you: @@ -574,8 +573,8 @@ And this is what we get: >>> create_file('web/__init__.py', 'v1', r""" ... import os - ... from wsgikit import wsgilib - ... from wsgikit.util.thirdparty import add_package + ... from paste import wsgilib + ... from paste.util.thirdparty import add_package ... add_package('sqlobject') ... import sqlobject ... @@ -587,7 +586,7 @@ And this is what we get: ... environ['todo_sql.base_url'] = environ['SCRIPT_NAME'] ... if not sql_set: ... sql_set = True - ... db_uri = environ['wsgikit.config']['database'] + ... db_uri = environ['paste.config']['database'] ... sqlobject.sqlhub.processConnection = sqlobject.connectionForURI( ... db_uri) ... """) diff --git a/docs/WSGIKit.txt b/docs/WSGIKit.txt index 38687d3..e822215 100644 --- a/docs/WSGIKit.txt +++ b/docs/WSGIKit.txt @@ -1,5 +1,5 @@ -WSGIKit -=========== +Python Paste +============ This is a WSGI_ version of WebKit. In addition to supporting WSGI, it also is a simplification and refactoring of Webware. @@ -9,7 +9,7 @@ also is a simplification and refactoring of Webware. License ------- -WSGIKit is distributed under the `Python Software Foundation`__ +Paste is distributed under the `Python Software Foundation`__ license. This is a BSD/MIT-style license. .. __: http://www.python.org/psf/license.html @@ -21,16 +21,16 @@ First, grab WSGIUtils, at http://www.owlfish.com/software/wsgiutils/, or download it directly from http://www.owlfish.com/software/wsgiutils/downloads/WSGI%20Utils-0.5.tar.gz -You can use other servers with WSGIKit, but WSGIUtils is pretty easy +You can use other servers with Paste, but WSGIUtils is pretty easy and built on SimpleHTTPServer. Run ``python setup.py install`` to install it. -Right now it's best NOT to install WSGIKit with ``setup.py``, but just +Right now it's best NOT to install Paste with ``setup.py``, but just to run it out of the checkout. An easy way to do that:: ./scripts/app-setup create webkit_zpt /path/to/put/files cd /path/to/put/files - /path/to/wsgikit/scripts/server -v + /path/to/paste/scripts/server -v And it will be running a server on http://localhost:8080/ @@ -54,7 +54,7 @@ Some parts that aren't being brought over: all of them. The environment (``request.environ()``) may look different than in Webware -- it matches the WSGI expectations. It's certainly possible -- and hopefully clearer -- to do introspection - in WSGIKit, but it might not be backward compatible (but still file + in Paste, but it might not be backward compatible (but still file bugs if you find problems). Discussion @@ -76,7 +76,7 @@ like:: database_name = 'app_data' And so on. There's a default configuration file in -``wsgikit/default_config.conf`` which will also serve as +``paste/default_config.conf`` which will also serve as documentation. Your configuration overrides those values. The extension is arbitrary at this point. @@ -137,8 +137,8 @@ like:: #!/usr/bin/env python # maybe import sys and modify sys.path - from wsgikit import cgiserver - from wsgikit.webkit import wsgiwebkit + from paste import cgiserver + from paste.webkit import wsgiwebkit app = wsgiwebkit.webkit('/path/to/app') cgiserver.run_with_cgi(app) @@ -156,8 +156,8 @@ this server use:: #!/usr/bin/env python # maybe import sys and modify sys.path - from wsgikit import twisted_wsgi - from wsgikit.webkit import wsgiwebkit + from paste import twisted_wsgi + from paste.webkit import wsgiwebkit app = wsgiwebkit.webkit('/path/to/app') twisted_wsgi.serve_application(app, 8080) @@ -179,7 +179,7 @@ To set up this server use:: #!/usr/bin/env python from wsgiutils import wsgiServer - from wsgikit.webkit import wsgiwebkit + from paste.webkit import wsgiwebkit app_root='/path/to/app' app = wsgiwebkit.webkit(app_root) server = wsgiServer.WSGIServer(('127.0.0.1', 8080), {'/': app}) @@ -194,8 +194,8 @@ is a simple way:: #!/usr/bin/env python # maybe import sys and modify sys.path - from wsgikit import wsgilib - from wsgikit.webkit import wsgiwebkit + from paste import wsgilib + from paste.webkit import wsgiwebkit app = wsgiwebkit.webkit('/path/to/app') def run(url): print wsgilib.interactive(application, url) diff --git a/docs/servers.txt b/docs/servers.txt index bc9970e..9540f02 100644 --- a/docs/servers.txt +++ b/docs/servers.txt @@ -1,6 +1,6 @@ -+++++++++++++++ -WSGIKit Servers -+++++++++++++++ +++++++++++++++++++++ +Python Paste Servers +++++++++++++++++++++ :author: A.M. Kuchling <amk@amk.ca> :revision: $Rev$ @@ -32,16 +32,16 @@ Configuration Configuration information is read from a number of sources, in the following order. - 1. A set of default values, contained in the code of the - wsgikit.server module. - 2. From wsgi-server's command line arguments. - 3. From the ``default_config.conf`` file in the installed ``wsgikit`` directory. - 4. From the `server.conf` file in the current working directory. - (You can set a `no_server_conf` config setting to skip - reading this file.) - 5. If the `config_file` setting is present at this point, - it should contain the path of a configuration file. - This file is parsed and processed last. + 1. A set of default values, contained in the code of the + paste.server module. + 2. From wsgi-server's command line arguments. + 3. From the ``default_config.conf`` file in the installed ``paste`` directory. + 4. From the `server.conf` file in the current working directory. + (You can set a `no_server_conf` config setting to skip + reading this file.) + 5. If the `config_file` setting is present at this point, + it should contain the path of a configuration file. + This file is parsed and processed last. After going through these steps, configuration is complete. @@ -49,7 +49,7 @@ After going through these steps, configuration is complete. Servers -------- -WSGIKit can run a web application in a number of different modes: CGI, +Paste can run a web application in a number of different modes: CGI, standalone HTTP, SCGI, and a console mode which simulates CGI. Some of these modes require additional software; the ``build-pkg`` script will download the necessary packages for you. diff --git a/docs/web/index.txt b/docs/web/index.txt index fabef83..1695d03 100644 --- a/docs/web/index.txt +++ b/docs/web/index.txt @@ -1,25 +1,20 @@ -WSGIKit -+++++++ +Python Paste +++++++++++++ -.. raw:: html +Python Paste is a web application framework framework. - <img - src="http://www.imagescape.com/software/docs/wsgikit-pycon2005/whiskey-cup.jpg" - align="right" - title="WSGIKit: pronounced like whisky-kit. Cures what's ailin' ya'"> - -WSGIKit is a reimplementation of `Webware for Python`_, using WSGI_ to -create a framework-neutral foundation. +Paste includes a reimplementation of `Webware for Python`_, using +WSGI_ to create a framework-neutral foundation. .. _Webware for python: http://www.webwareforpython.org .. _WSGI: http://www.python.org/peps/pep-0333.html -To check out WSGIKit:: +To check out Paste:: - $ svn co http://svn.w4py.org/WSGIKit/trunk WSGIKit + $ svn co http://svn.w4py.org/Paste/trunk Paste Note that it includes a script ``build-pkg`` which fetches a bunch of -packages that make WSGIKit more useful. A big tarball of all the +packages that make Paste more useful. A big tarball of all the requirements stuffed together will probably be forthcoming. Get Involved @@ -45,25 +40,26 @@ IRC: Resources ========= -* `To-do tutorial`_, an introduction to WSGIKit installation and application +* `To-do tutorial`_, an introduction to Paste installation and application design -* `What is WSGIKit? +* `What is Paste? <http://blog.ianbicking.org/what-is-wsgikit.html>`_: a description - of WSGIKit's scope. + of Paste's scope. (Note that Paste was known as "WSGIKit" when this + was written.) -* `What can WSGIKit do for you? +* `What can Paste do for you? <http://blog.ianbicking.org/what-can-wsgikit-do-for-you.html>`_: a - description of what WSGIKit offers to Python web framework authors. + description of what Paste offers to Python web framework authors. * Ian Bicking presented at `PyCon 2005`_ on `WSGI Middleware and WSGIKit`_: *Using WSGI Middleware to build a foundation for Python web programming* -* The Webware API portion of WSGIKit should be discussed on +* The Webware API portion of Paste should be discussed on webware-discuss@lists.sf.net -* The WSGI aspect of WSGIKit should be discussed on web-sig@python.org +* The WSGI aspect of Paste should be discussed on web-sig@python.org .. _To-do tutorial: ./docs/TodoTutorial.html .. _PyCon 2005: http://pycon.org/dc2005 |
