Provide shared memory data structures!
Shared Memory Data Structure
This package allows you to use your data structures like numpy arrays in the shared memory environment between two or more python processes. This library simplifies the use of shared memory data structures as you don't need to manually manage shared memory.
from shared_ds import SharedArray # Create shared memory and put you numpy array into that memory segment. shared_np_array = SharedArray.from_array(np_array) shm_descriptor = shared_np_array.to_json()
from shared_ds import SharedArray # Attaches to existing shared memory and reads numpy array representation. shared_np_array = SharedArray.from_json(shm_descriptor) shm_descriptor = shared_np_array.to_json()
Always delete your data structures after use.
from shared_ds import SharedArray # Create shared memory and put you numpy array into that memory segment. shared_np_array = SharedArray.from_array(np_array) shm_descriptor = shared_np_array.to_json() # Delete and release SHM after usage. shared_np_array.destroy()
Currently supported data structures:
- Numpy Array
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size shared_ds-0.0.3-py2.py3-none-any.whl (3.4 kB)||File type Wheel||Python version py2.py3||Upload date||Hashes View|
|Filename, size shared_ds-0.0.3.tar.gz (3.1 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for shared_ds-0.0.3-py2.py3-none-any.whl