blob-0.5.tgz (requires Zope 2.8+)
View CVS Repository
http://cvs.plope.com/viewcvs/Products/blob
This product is for Zope developers (not end users). It provides an alternative to storing large binary chunks of arbitrary data in ZODB, allowing this kind of data to live instead in files on a filesystem. Unlike a "roll your own" solution, it provides transactional integrity while doing so. It also provides a simple UNIX-like API for dealing with file objects.
To write a new blob in a method of a Zope Product class:
from Products.blob.file import FileBlob
self.blob = FileBlob()
file = self.blob.open('wb')
# file supports all Python file operations consistent with the mode
# used to open the file, in this case "write", "truncate", "close"
file.write('some_data')
file.close()
UNIX-only, Python 2.3.X or better.
This is a Zope Product and installs like any other Zope product.
ZPL 2.1.
Visit the Plope software collector to report bugs.