Python roles module

Library for Role based development

Roles provides a Pythonic implementation of the DCI (Data Context Interaction) paradigm (http://www.artima.com/articles/dci_vision.html).

Roles allow you to assign and revoke behaviour on a per-instance basis. This defines the big difference with mixins, which are assigned at class level.

A role has a special meaning in a context (imagine you want to do a money transfer: in this context you’ll need 2 accounts, a source and a destination account). The roles module provides a simple implementation for defining contexts.

Roles can be assigned and revoked. Multiple roles can be applied to an instance. Revocation can happen in any particular order.


Homepage:
http://amolenaar.github.com/roles
Sources:
http://github.com/amolenaar/roles
Downloads:
http://pypi.python.org/pypi/roles

Contents:

Indices and tables

Table Of Contents

Next topic

Usage

This Page