Skip to content

Library authors

Name What it does
SupportsSharedBox an object that hands its shared-memory segment to other extensions
get_include returns the folder holding sharedbox/sharedbox.hpp, sharedbox/sharedbox_c.h and sharedbox/sharedbox_c.cpp

To build an extension that takes a box from Python, follow How to accept a box in a C++ extension.

SupportsSharedBox

Bases: Protocol

An object that hands its shared-memory segment to other extensions.

SharedBox is one. Annotate a parameter with it in a function that accepts a box.

get_include

get_include() -> str

Return the folder holding sharedbox/sharedbox.hpp, sharedbox/sharedbox_c.h and sharedbox/sharedbox_c.cpp.

Add it to the include path of an extension that uses a box through its capsule.

Raises:

Type Description
FileNotFoundError

If sharedbox.hpp is not installed with this copy of sharedbox.