This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

An alternate implementation of the repoze.bfg.interfaces.ITraverserFactory (a “traverser”) which allows you to register an adapter factory for the type or interface(s) of objects encountered during traversal. This is a generalization of the repoze.bfg.traversalwrapper package which automatically wraps each traversed object into a location-aware proxy.

To enable this custom traverser factory, you need to add a dependency on repoze.bfg.traversaladapter to your application and replace the default traverser factory in the configure.zcml configuration file like this:


Given a simple factory for adapters for a model class mymodule.Foo defined in the module mymodule like this

def foo_factory(foo, parent, name):
    return FooAdapter(foo, parent, name)

you could then register foo_factory as a traversal adapter factory as follows:


If Foo was implementing the interface mymodule.IFoo, the following registration would also work:


During traversal of your repoze.bfg application, each object of type Foo will then automatically be wrapped in a FooAdapter instance.

Note that the registered factory always gets the current model object, its parent and its name passed as arguments. If your FooAdapter class was set up to receive a Foo instance, a parent object, and a name string in its constructor like so

class FooAdapter(object):
    def __init__(self, foo, parent, name): = foo
        self.parent = parent = name

you could register the adapter class itself as the adapter factory.

See the repoze.bfg.traversaladapter.tests.TraversalAdapterTests module for further examples.

Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
repoze.bfg.traversaladapter-0.1.tar.gz (5.9 kB) Copy SHA256 Checksum SHA256 Source Dec 1, 2009

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting