restish.resource — Restish v0.5 documentation

### Navigation

- index
- modules |
- Restish v0.5 documentation »

Overview

# restish.resource

Base Resource class and associates methods for children and content negotiation

class `restish.resource.` `AnyChildMatcher`

  Bases: `object`

  A @child matcher that will always match, returning to match args and the list of segments unchanged.

class `restish.resource.` `DELETE`(accept='*/*', content_type='*/*')

  Bases: `restish.resource.MethodDecorator`

  http DELETE method

class `restish.resource.` `GET`(accept='*/*', content_type='*/*')

  Bases: `restish.resource.MethodDecorator`

  http GET method

class `restish.resource.` `MethodDecorator`(accept='*/*', content_type='*/*')

  Bases: `object`

  content negotition decorator base class. See DELETE, GET, PUT, POST

class `restish.resource.` `POST`(accept='*/*', content_type='*/*')

  Bases: `restish.resource.MethodDecorator`

  http POST method

class `restish.resource.` `PUT`(accept='*/*', content_type='*/*')

  Bases: `restish.resource.MethodDecorator`

  http PUT method

class `restish.resource.` `Resource`

  Bases: `object`

  Base class for additional resource types.

  Provides the basic API required of a resource (resource_child(request, segments) and __call__(request)), possibly dispatching to annotated methods of the class (using metaclass magic).

  `resource_child`(request, segments)

class `restish.resource.` `TemplateChildMatcher`(pattern)

  Bases: `object`

  A @child matcher that parses a template in the form /fixed/{dynamic}/fixed, extracting segments inside {} markers.

`restish.resource.` `child`(matcher=None)
  Child decorator used for finding child resources

### Navigation

- index
- modules |
- Restish v0.5 documentation »