[Zconfig] ZConfig example to configure a ZEO client
Willadsens
aagg at comcast.net
Thu Feb 17 14:43:38 EST 2005
Is it really this easy? Excellent! Thank you. This is exactly what I needed.
Can you tell me if the files are physically replicated to the client
side? Or do they remain on the server side?
Thanks once again,
Gloria
>The simplest case looks like:
>
> zeo_host = ... # the hostname, ZEO runs on
> zeo_port = ... # the port, ZEO listens on
>
> from ZEO.ClientStorage import ClientStorage
> storage = ClientStorage((zeo_host, zeo_port))
> from ZODB.DB import DB
> db=DB(storage)
> connection = db.open()
> root = connection.root() # this is the ZODB root; dictionary like
> ... do whatever you want ...
> get_transaction().commit() # commit your changes
>
>
>
More information about the ZConfig
mailing list