sharedbox
sharedbox keeps records in shared memory. Each box is one named segment, and every process that opens it reads and writes the same fields.
Installation
It is recommended to install sharedbox in a virtual environment; for example using uv:
uv venv --python 3.11
.venv\Scripts\activate
uv pip install sharedbox
Quick start
import multiprocessing as mp
from typing import Annotated
from sharedbox import Capacity, SharedBox
class Motor(SharedBox):
position: int
enabled: bool
label: Annotated[str, Capacity(32)]
def worker() -> None:
motor = Motor.attach() # finds the box by its class
motor.position = 10
motor.close()
if __name__ == "__main__":
with Motor(1, False, "x-axis") as motor:
motor.events.position.connect(lambda new, old: print(old, "->", new))
child = mp.Process(target=worker)
child.start()
child.join() # prints: 1 -> 10
Motor.unlink()
Documentation
The documentation site has a tutorial, how-to guides, explanations of how a box works, and the API reference.
C++ and C code can take a box from Python or open one by name; see the C and C++ guides.
License
Licensed under Apache 2.0
Metadata
Release files for sharedbox 0.4.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 | Provenance | |
|---|---|---|---|---|
| sharedbox-0.4.1.tar.gz | 494.6 kB | With provenance | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| sharedbox-0.4.1-cp314-cp314t-win_amd64.whl | CPython 3.14 | CPython 3.14 free-threading | Windows x86-64 | Details |
| sharedbox-0.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl | CPython 3.14 | CPython 3.14 free-threading | Linux musl 1.2+ x86-64 | Details |
| sharedbox-0.4.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.14 | CPython 3.14 free-threading | Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 | Details |
| sharedbox-0.4.1-cp312-abi3-win_amd64.whl | CPython 3.12 | abi3 | Windows x86-64 | Details |
| sharedbox-0.4.1-cp312-abi3-musllinux_1_2_x86_64.whl | CPython 3.12 | abi3 | Linux musl 1.2+ x86-64 | Details |
| sharedbox-0.4.1-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.12 | abi3 | Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 | Details |
| sharedbox-0.4.1-cp311-cp311-win_amd64.whl | CPython 3.11 | CPython 3.11 | Windows x86-64 | Details |
| sharedbox-0.4.1-cp311-cp311-musllinux_1_2_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux musl 1.2+ x86-64 | Details |
| sharedbox-0.4.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 | Details |
Total release size: 4.2 MB
Security for sharedbox 0.4.1
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.
Full provenance
All 10 files in this release have been uploaded with provenance metadata.
Attestation for sharedbox-0.4.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.
Transparency logA 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.