ZODB context manager
Project description
ZODB context manager
Installation
pip install zodb-cm
ZConnection()
- Provides a ZODB connection with auto-abort (default).
- Provides a tuple of connection and root object:
with ZConnection(db) as cx, root:
root.one = "ok"
- ZConnection implements a connection context manager.
- Transaction context managers in contrast do auto-commit:
- with db.transaction() as connection, or
- with cx.transaction_manager as transaction, or
- with transaction.manager as transaction (for the thread-local transaction manager)
- See also http://www.zodb.org/en/latest/guide/transactions-and-threading.html
ZDatabase()
- Provides a ZODB database context manager.
Change History
0.1.0 (2021-02-17)
- Package creation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
zodb-cm-0.1.tar.gz
(2.3 kB
view hashes)
Built Distribution
zodb_cm-0.1-py3-none-any.whl
(2.4 kB
view hashes)