repoze.folder package provides a barebones ZODB folder implementation with object event support. Folders have a dictionary-like interface and emit "object events" on the addition and removal of objects when certain methods of this interface are exercised.
Using a folder:
>>> from repoze.folder import Folder
>>> from persistent import Persistent
>>> folder = Folder()
>>> class Child(Persistent):
>>> pass
>>> folder['child1'] = Child()
>>> folder['child2'] = Child()
>>> list(folder.keys())
['child1', 'child2']
>>> folder.get('child1')
< Child object at ELIDED >
>>> del folder['child1']
>>> list(folder.keys())
['child2']
Folder objects are based on BTree code, so as long as you persist them, the folder should be able to contain many objects efficiently.
What is new in this release:
- This release is the last which will maintain support for Python 2.4 / Python 2.5.
- Added support for continuous integration using tox and jenkins.
- Added 'setup.py dev' alias (runs setup.py develop plus installs nose and coverage).
- Moved to GitHub.
Requirements:
- Python
Comments not found