Readonly Storage
A simple read-only wrapper around a regular ZODB storage.
import ZODB
# Let's set a read-write DemoStorage
rw_storage = ZODB.DemoStorage.DemoStorage()
rw_db = ZODB.DB(rw_storage)
# And now, let's set a ReadOnlyStorage around it.
ro_storage = readonlystorage.ReadOnlyStorage(rw_storage)
ro_db = ZODB.DB(ro_storage)
# Now, add some data
rw_conn = rw_db.open()
rw_conn.root()["foo"] = "bar"
rw_conn.transaction_manager.commit()
rw_conn.close()
# Read the data
ro_conn = ro_db.open()
assert "bar" == ro_conn.root()["foo"]
ro_conn.root()["foo"] = "anything"
ro_conn.transaction_manager.commit() # This one would emit a ZODB.POSException.ReadOnlyError!
ro_conn.close()
Release files for readonlystorage 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| readonlystorage-0.0.1.tar.gz | 2.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| readonlystorage-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.0 kB
Release files / readonlystorage-0.0.1.tar.gz
| Download URL | readonlystorage-0.0.1.tar.gz |
|---|---|
| Size | 2.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
faa7d1072c6b39733cb9b719719f030374345eab1556f563e136ab35d1d971dd
|
|
BLAKE2b-256 checksum How to use checksums |
46c8c026a1b7d68d42363266910d0012c7a75fb4b0b601a8d2dc3fa2013e97bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
|
Release files / readonlystorage-0.0.1-py3-none-any.whl
| Download URL | readonlystorage-0.0.1-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
be17559b582d0477bf75204edab90da22057ce80dab0133b067680be454d8f8e
|
|
BLAKE2b-256 checksum How to use checksums |
649b8d5543197190dbf85fb9086425c66555f0bf097bb028714f8db4f000607d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
|