Skip to main content

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:
    1. with db.transaction() as connection, or
    2. with cx.transaction_manager as transaction, or
    3. 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

This version

0.1

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)

Uploaded source

Built Distribution

zodb_cm-0.1-py3-none-any.whl (2.4 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page