Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install otto

How to install Otto

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install otto
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.2 Available View build log
Windows (64-bit)
1.2 Available View build log
Mac OS X (10.5+)
1.2 Available View build log
Linux (32-bit)
1.2 Available View build log
Linux (64-bit)
1.2 Available View build log
 
Author
License
BSD
Dependencies
Depended by
Imports
Lastest release
version 1.2 on Jan 5th, 2011

Overview

Otto is an HTTP publisher which uses a routes-like syntax to map URLs to code. It supports object traversal.

You can use the publisher to write web applications. It was designed with both small and large applications in mind. We have tried to incorporate elements of existing publishers to allow diverse and flexible application patterns while still being in concordance with the Zen Of Python.

Here's a variation of a familiar theme:

System Message: WARNING/2 (<string>, line 19)

Literal block expected; none found.

import otto import webob import wsgiref.simple_server

app = otto.Application()

@app.connect("/*path/:name") def hello_world(request, path=None, name=u'world'): return webob.Response(u"An %d-deep hello %s!" % (len(path), name))

System Message: WARNING/2 (<string>, line 25); backlink

Inline emphasis start-string without end-string.

wsgiref.simple_server.make_server('', 8080, app).serve_forever()

This release is compatible with Python 2.4+.

See the documentation for this release.

Changes

1.2 (2009-11-16)
Features
  • Route matches that come before object mapping are passed on to the

System Message: WARNING/2 (<string>, line 47)

Bullet list ends without a blank line; unexpected unindent.

mapper on instantiation; these matches are then not passed to the controller.

Backwards incompatibilities
  • The object mapper takes the place of the traverser; on

System Message: WARNING/2 (<string>, line 54)

Bullet list ends without a blank line; unexpected unindent.

instantiation it gets the part of the match dictionary that comes before the asterisk.

  • The empty asterisk is now mapped to the empty string. This does not

System Message: WARNING/2 (<string>, line 58)

Bullet list ends without a blank line; unexpected unindent.

change the high-level interface.

1.1 (2009-11-12)
Features
  • The leading slash is now optional in a route path definition.
  • The Route class now provides the match method.
Backwards incompatibilities
  • The Publisher.route method was renamed to connect. This

System Message: WARNING/2 (<string>, line 74)

Bullet list ends without a blank line; unexpected unindent.

method now takes a route object. This change was also applied for the Router class.

1.0 (2009-11-12)
  • Initial public release.

Subscribe to package updates

Last updated Jan 5th, 2011

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.