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)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| redison-1.0a5-py36-none-any.whl | Python 3.6 | none | any | Details for redison-1.0a5-py36-none-any.whl |
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
|
Security for redison 1.0a5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.