The Python adapter uses cffi (not ctypes) for FFI bindings. It wraps numpy’sDocumentation Index
Fetch the complete documentation index at: https://mine-27913f41.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
np.frombuffer for zero-copy array views.
Installation
SharedRegion
create
OSError if the name already exists, the name is invalid, or the capacity is not page-aligned.
open
OSError if the region does not exist or the header is corrupted.
as_buffer
Returns amemoryview backed directly by the shared mmap. No copying occurs.
as_numpy
Returns a numpyndarray backed directly by the shared memory. No copying occurs. Requires numpy to be installed.
np.uint8.
notify
wait
True if notified, False if timed out.
close
SharedRegion object is garbage collected or used as a context manager:
Example: numpy integration
as_numpy call returns a view, not a copy. Writing to the array from either process modifies the same physical memory.
FFI details
The adapter loadslibzinc_core.{so,dylib,dll} at import time. It reads zinc.h from include/ relative to the Python package to define the FFI signatures. If the header is missing, it falls back to a hardcoded CDEF.
The library path is resolved relative to the Python package location. If the library is not found, copy it to a standard library path or set LD_LIBRARY_PATH / DYLD_LIBRARY_PATH.