Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Redison : Redis + Json : Shared objects in memory using redis and json files

Getting Started

numpy

from redison import RedisObject
import numpy as np

array = np.random.rand(10)  # Set the object in python stack
print(array) # Retrieve the object from the stack
array = RedisObject(array)  # Set the object in redis
print(array.get())  # Retrieve the object from the redis database

multiproc

Processus 1

from redison import RedisObject
import numpy as np

while True:
    # Push array1
    RedisObject(id="array1", data=np.random.rand(10))

    # Pull array2
    array2 = RedisObject(id="array2")

    # Wait for array1 to be set in redis by proc2
    print(array2.get(blocking=True)) 

Processus 2

from redison import RedisObject
import numpy as np

while True:
    # Push array2
    RedisObject(id="array2", data=np.random.rand(10))

    # Pull array1
    array1 = RedisObject(id="array1")

    # Wait for array1 to be set in redis by proc1
    print(array1.get(blocking=True)) 

multiproc remote

Processus 1

from redison import RedisObject
import numpy as np

while True:
    # Create array2
    array1 = np.random.rand(10)

    # Push array2 
    RedisObject(id="array1",
                data=array1,
                host="10.1.0.2")

    # Pull array1
    array2 = RedisObject(id="array2", 
                         host="10.2.0.2")

    # Wait for array1 to be set on the remote machine 2
    print(array2.get(blocking=True)) 

Processus 2

from redison import RedisObject
import numpy as np

while True:
    # Create array2
    array2 = np.random.rand(10)

    # Push array2 
    RedisObject(id="array2",
                data=array2,
                host="10.2.0.2")

    # Pull array1
    array1 = RedisObject(id="array1", 
                         host="10.1.0.2")

    # Wait for array1 to be set on the remote machine 1
    print(array1.get(blocking=True)) 

Contributions

Email me at j.cadic@9dw-lab.com for any questions.

Metadata

Release files for redison 1.0a5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for redison 1.0a5
File Interpreter ABI Platform
redison-1.0a5-py36-none-any.whl Python 3.6 none any Details

Release files / redison-1.0a5-py36-none-any.whl

Download URL redison-1.0a5-py36-none-any.whl
Size 2.7 kB
Tags Python 3.6
SHA-256 checksum
How to use checksums
874da658a4c7803b8d94821304d5f772b1e94d5c97f39cded066c78ff3936ac4
BLAKE2b-256 checksum
How to use checksums
3229a295080ac7825c11153971919c16b9b1bb5a305a44c73bc555424ababfe5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.6

Release history Release notifications | RSS feed

This release

1.0a5 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page