Shared list / set / dict across processes / environments
pip install sharedbuiltinmutables
Tested against Windows 10 / Python 3.11 / Anaconda
FILE 1
from sharedbuiltinmutables import MemSharedDict, MemSharedList, MemSharedSet, cfg
# dill/pickle protocol
cfg.protocol = 5
d = MemSharedDict({3: 323}, name="d1", size=1024)
l = MemSharedList([3, 323], name="l1", size=1024)
s = MemSharedSet({3, 6, 5}, name="s1", size=1024)
d[111] = 444
d.pop(3)
d[9] = lambda h: h * 3
# to clean up: d.cleanup()
FILE 2
from sharedbuiltinmutables import MemSharedDict, MemSharedList, MemSharedSet, cfg
# dill/pickle protocol
cfg.protocol = 5
d = MemSharedDict(name="d1", size=1024)
# passing a value ( d = MemSharedDict({33:11,3:3} name="d1", size=1024) )
# won't do anything if
# the dict has already been created by another proc
#
# use instead:
# d = MemSharedDict(name="d1", size=1024)
# d.clear()
# d.update({33:11,3:3})
l = MemSharedList(name="l1", size=1024)
s = MemSharedSet(name="s1", size=1024)
# to clean up: d.cleanup()
Metadata
Release files for sharedbuiltinmutables 0.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sharedbuiltinmutables-0.11.tar.gz | 7.8 kB | Without provenance | Details for sharedbuiltinmutables-0.11.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sharedbuiltinmutables-0.11-py3-none-any.whl | Python 3 | none | any | Details for sharedbuiltinmutables-0.11-py3-none-any.whl |
Total release size: 16.5 kB
Security for sharedbuiltinmutables 0.11
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.