Skip to main content

WSGI-compliant HTTP publisher.

Project description

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:

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))

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.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 method now takes a route object. This change was also applied for the Router class.

1.0 (2009-11-12)

  • Initial public release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Otto-1.1.tar.gz (68.4 kB view details)

Uploaded Source

File details

Details for the file Otto-1.1.tar.gz.

File metadata

  • Download URL: Otto-1.1.tar.gz
  • Upload date:
  • Size: 68.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Otto-1.1.tar.gz
Algorithm Hash digest
SHA256 d6ecedf5f26688e7eb8b23b6d31115c0aeab296cf5c236b47225b94573ed89a0
MD5 f77ae0428f9d0a566bc4f46bbccc0176
BLAKE2b-256 81415d521f2e2d83b31f4b9345d4405ccb8257edd8620a6d468d0533e2fa4bd8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page