PYPI PACKAGE AUDIT v0.11.0 Incompleto

sharedbox

Contenedores Python que utilizan memoria compartida.

PyPkgScore sharedbox
Metodología y Criterios ♥ Donate
290 / 1000
Instalación Rápida
pip install sharedbox
1. Gobernanza
0/200
2. Metadatos PEP
100/200
3. Seguridad
130/200
4. Docs y SEO
60/200
5. Ingeniería CI
0/200
📣 Compartir Auditoría: Comparte este informe y la vista previa en el idioma actual
Advertisement
TELEMETRÍA PYPI

Descargas y Adopción en la Comunidad

Últimos 30 días (sin espejos)
Últimos 7 días
1151
Últimos 30 días
3942
Total (180 días)
7035
Métrica / Ecosistema Estado / Valor Fuente
Downloads (30d / 180d) — PyPI Stats (without mirrors)
Trusted Publishing (PEP 740) ✓ Verified OIDC PyPI Integrity / Sigstore
Django Packages — djangopackages.org
PyTech / PyPkgScore 290 / 1000 PyPkgScore Engine

Análisis de Salud e Ingeniería (5 Pilares)

1. Gobernanza y Comunidad0 / 200 ▾
LICENSE✕ 0 pts
SECURITY.md✕ 0 pts
CONTRIBUTING.md✕ 0 pts
CODE_OF_CONDUCT.md✕ 0 pts
2. Metadatos y Empaquetado PEP100 / 200 ▾
Wheel (.whl)✓ 50 pts
pyproject.toml✕ 0 pts
Project URLs✕ 0 pts
Trove Classifiers✓ 50 pts
3. Seguridad y Cadena de Suministro130 / 200 ▾
Cero CVEs (OSV)✓ 60 pts
Trusted Publishing (OIDC)✓ 50 pts
Snyk / Audit Link✕ 0 pts
Repositorio HTTPS✕ 0 pts
4. Documentación, SEO y Ecosistema60 / 200 ▾
README Estructurado✓ 60 pts
Read the Docs✕ 0 pts
Django Packages✕ 0 pts
Sitio Web / Artículos Técnicos✕ 0 pts
5. Ingeniería, CI y Calidad0 / 200 ▾
Pruebas Automatizadas✕ 0 pts
GitHub Actions CI✕ 0 pts
CHANGELOG.md✕ 0 pts
Env & Lockfile (uv/rye/poetry/pdm/hatch)✕ 0 pts
Advertisement
README & DOCS

Documentación Oficial y Guía de Uso — sharedbox

PyPI Metadata v0.11.0
Mostrar documentación original completa (README en inglés) ▾

sharedbox

PyPI CI CodSpeed Ruff clang-format Checked with mypy

[!WARNING] This project is a work in progress; be patient or feel free to contribute.

sharedbox lets Python processes on one machine share data in shared memory, without a server and without pickling. It gives you two things to share:

  • a box, one record that every process reads and writes, as if they all held the same dataclass;
  • a stream, a flow of typed items that one process sends and each reader receives once.

You declare the fields once, and every process that opens the box or the stream works on the same bytes in shared memory, so nothing passes through a pipe or a socket between the processes. That fits wherever separate processes need the same data at once: web workers sharing state with a dashboard, a GUI and the backend process that does its work, the stages of a data pipeline, the state of a game or a simulation, or lab instruments and the programs that show them.

Installation

sharedbox needs CPython 3.11 or newer on Windows x64 or Linux x86_64. PyPI has compiled wheels, so you don't need a compiler:

pip install sharedbox

or, in a project that uv manages:

uv add sharedbox

Quick start

import multiprocessing as mp
from typing import Annotated

from sharedbox import Capacity, SharedBox


class Mailbox(SharedBox):
    letters: int
    flag_up: bool
    owner: Annotated[str, Capacity(32)]


def deliver() -> None:
    mailbox = Mailbox.attach()  # finds the box by its class
    mailbox.letters = 1
    mailbox.close()


if __name__ == "__main__":
    with Mailbox(0, False, "Ada") as mailbox:
        mailbox.events.letters.connect(lambda new, old: print(old, "->", new))
        carrier = mp.Process(target=deliver)
        carrier.start()
        carrier.join()  # prints: 0 -> 1
    Mailbox.unlink()

The carrier process finds the box by its class alone, and the parent prints the change as soon as the carrier makes it.

Documentation

The documentation site starts with three tutorials, then has how-to guides for single tasks, such as sending items through a stream. After them come explanations of how a box works and the API reference. C and C++ code can use a box too, either handed over from Python or opened by name; the C and C++ guides show how.

Development

To change sharedbox itself you need git, uv, CMake 3.30 or newer and a C++20 compiler (MSVC or GCC):

git clone https://github.com/jacopoabramo/sharedbox.git
cd sharedbox
uv sync --dev
uv run pytest

How to set up a development environment has the details.

License

Licensed under Apache 2.0