Door
Door is a comprehensive python library for synchronization proxies. Door’s reliability has been established through static type checking, extensive doctests, and unit tests, achieving 93% code coverage.
Features
Share objects across processes without queues or pipes.
Synchronization proxies to enforce sound synchronous data access.
Supported scenarios:
Threading;
Multiprocessing;
Asynchronous programming.
Shared lock (Readers-writer lock) implementations.
Shared condition variable (Readers-writer condition variables) implementations.
Installation
pip install door
Usage
Below shows a sample usage of Door.
>>> from dataclasses import dataclass
>>> from multiprocessing import Process
>>> from door.multiprocessing2 import Handle, SAcquirableDoor
>>> @dataclass
... class Resource:
... key: str = 'value'
...
>>> handle = Handle(Resource())
>>> handle.get()
Resource(key='value')
>>> door = SAcquirableDoor(handle)
>>> def func(door):
... with door.write() as proxy:
... proxy.key = 'VALUE'
...
>>> process = Process(target=func, args=(door,))
>>> process.start()
>>> process.join()
>>> handle.get()
Resource(key='VALUE')
>>> handle.unlink()
Testing and Validation
Door has extensive test coverage, passes mypy static type checking with strict parameter, and has been validated through extensive use in real-life scenarios.
Contributing
Contributions are welcome! Please read our Contributing Guide for more information.
License
Door is distributed under the MIT license.
Metadata
Release files for door 0.0.4
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 |
|---|---|---|---|---|
| door-0.0.4.tar.gz | 12.0 kB | Without provenance | Details for door-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| door-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for door-0.0.4-py3-none-any.whl |
Total release size: 27.9 kB
Release files / door-0.0.4.tar.gz
| Download URL | door-0.0.4.tar.gz |
|---|---|
| Size | 12.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
af3d88e48f48d0dcfb6be3bf15444be3a389273f2922e13e951e8689e73207b0
|
|
BLAKE2b-256 checksum How to use checksums |
a054c3e691de7aaee958d080ae04ed766d606917396bcd7facd64b248b25c4ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.9
|
Release files / door-0.0.4-py3-none-any.whl
| Download URL | door-0.0.4-py3-none-any.whl |
|---|---|
| Size | 16.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e541e89350011138ca0ecd8def5f19d91bcecf1052f30c5c9eef2114bb9fc6e5
|
|
BLAKE2b-256 checksum How to use checksums |
8074fa43943862c23c808cbe3f30f7ba3a2d15194c8e6de622476e037067642e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.9
|
Security for door 0.0.4
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.