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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file zodb-cm-0.1.tar.gz.

File metadata

  • Download URL: zodb-cm-0.1.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1

File hashes

Hashes for zodb-cm-0.1.tar.gz
Algorithm Hash digest
SHA256 e737a57f0d17e5e90b984e1c54361bd2a3bc770dea1764264b5f1bd889519c7d
MD5 35a7ce9e83979cf754f7a86b3582309b
BLAKE2b-256 967162f2c2f9760b8105fe1a7a73087152b6af7bcaf4bb59b1b32fb5a4962c0f

See more details on using hashes here.

File details

Details for the file zodb_cm-0.1-py3-none-any.whl.

File metadata

  • Download URL: zodb_cm-0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1

File hashes

Hashes for zodb_cm-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 72759e130776bcc1d2d0c6bf5b3280cb75e39f07c6d64d4a05b7ab5be7c75873
MD5 c0228eb06d5f25e52c8e5ae75c647bd9
BLAKE2b-256 6cef7eb5e168bc9c2cfa9ca48e5baefaa55b8d5ffc2d0ce22fc90680f60ff489

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page