Package twisted :: Package popsicle :: Module mailsicle

[show private | hide private]
[frames | no frames]

## Module twisted.popsicle.mailsicle

Mailsicle

A Reference Implementation of a Popsicle Back-End.

This is a very simple persistence mechanism that demonstrates various things about the Popsicle persistence manager. It is very slow and its scalability depends intimately on the performance characteristics of your filesystem, so use with caution.

There are a few advantages to using Mailsicle for persistence, however. Its fileformat is almost completely transparent: it uses an RFC822-inspired (though by no means compliant!) fileformat for easy inspection and manual repair. It provides very basic indexes, which is a slight advantage over dirdbm+shelf persistence.

One slightly strange advantage is that it's somewhat tedious to write persistence adapters for mailsicle. This provides a useful exercise in locating the essential information that you want to persist, and can be a useful prelude to developing an efficient relational schema for a set of objects, while providing a fallback mechanism in the case where a database is not installed.

Future Work:

- optionally allow for backending to BSDDB or other single-file approach instead of sprawling across filesystem, first for indexes, then for content

Classes
`DefaultSaver` |
`IdentitySaver` | Persistor for cred Identities.
`Mailsicle` |
`MailsicleAuthorizer` | A twisted.cred authorizer that's persistent in a Mailsicle database.
`MailsicleService` | A twisted.cred service that's persistent in a Mailsicle database.
`PerspectiveSaver` |
`QueryResults` |

Function Summary
| `dictToHeaders(d)`
| `getSaver(o, repo)`
| `headersToTuples(hdrs)`
| `hexlify(s)`
| `makeStringList(l)`
| `parseOIDList(s)`
| `parseStringList(s)`
| `quotify(s)`
| `unhexlify(s)`
| `whitePrefix(s)`
| `writeHeader(f, k, v)`

Variable Summary
`instance method` | `getAdapter`
`instance method` | `getAdapterClassWithInheritance`
`MetaInterface` | `IHeaderSaver`
`MetaInterface` | `Interface`
`SRE_Pattern` | `poidl`
`SRE_Pattern` | `psl`
`instance method` | `registerAdapter`
`SRE_Pattern` | `wspr`

Variable Details

### getAdapter

`getAdapter` = `twisted.python.components.AdapterRegistry.getAdapter`

### getAdapterClassWithInheritance

`getAdapterClassWithInheritance` = `twisted.python.components.AdapterRegistry.getAdapterClassWithInheritance`

### IHeaderSaver

  Type:
    `MetaInterface`
  Value:

        <class 'twisted.popsicle.mailsicle.IHeaderSaver'>

### Interface

  Type:
    `MetaInterface`
  Value:

        <class 'twisted.python.components.Interface'>

### poidl

  Type:
    `SRE_Pattern`
  Value:

        (?:"((?:"|.)*?)" |)<([^>]*)>

### psl

  Type:
    `SRE_Pattern`
  Value:

        "((?:"|.)*?)"

### registerAdapter

`registerAdapter` = `twisted.python.components.AdapterRegistry.registerAdapter`

### wspr

  Type:
    `SRE_Pattern`
  Value:

        \S

Generated by Epydoc 1.1 on Thu May 8 13:16:35 2003 | http://epydoc.sf.net