rpyc_mem.client package
Submodules
rpyc_mem.client.remote_module module
Remote Module Access
- class rpyc_mem.client.remote_module.RemoteModule(rmem_conn)
Bases:
object
Expose remote modules to create remote python objects
- Parameters
rmem_conn (Union[rpyc_mem.connect.RpycMemConnect, Callable]) – Rpyc memory connection or a callable that returns Rpyc memory connection
- __call__(module='builtins', package=None)
Return
modules
of rpyc memory service hosts.- Parameters
module (str) – The module to import in absolute or relative terms (Ex: pkg.mod, ..mod). Defaults to
builtins
.package (str) – The package which acts as a base for resolving the module (should be set when relative imports are used)
- Returns
- property rmem_conn
Return the Rpyc memory connection from
_rmem_conn
object. If_rmem_conn
is callable return the result of_rmem_conn
invocation else_rmem_conn
.- Returns
rpyc_mem.client.rpyc_mem_object module
RPyC Memory Object
- class rpyc_mem.client.rpyc_mem_object.RpycMem(rmem_conn, unique_key, robj=<object object>, robj_gen=<object object>)
Bases:
object
Proxy class for python objects residing on RPyC memory service hosts
- Parameters
rmem_conn (Union[rpyc_mem.connect.RpycMemConnect, Callable]) – Rpyc memory connection or a callable that returns Rpyc memory connection on which the remote object should be synced
unique_key (Hashable) – The unique-key for syncing the remote object with Rpyc memory service
robj (Any) – The remote object to use for memoization (One among robj, robj_gen should be passed).
robj_gen (Callable) – The remote object generator to use for memoization (One among robj, robj_gen should be passed).
- property rmem_conn
Return the Rpyc memory connection from
_rmem_conn
object. If_rmem_conn
is callable return the result of_rmem_conn
invocation else_rmem_conn
.- Returns
- property real_obj
Property wrapper around rmem_get()
- Returns
- rmem_memoize(robj=<object object>, robj_gen=<object object>)
Memoize the remote object against the unique_key
- Parameters
robj (Any) – The remote object to use for memoization (One among robj, robj_gen should be passed).
robj_gen (Callable) – The remote object generator to use for memoization (One among robj, robj_gen should be passed).
- Returns
- rmem_get()
Get the live remote object against the unique-key.
- Returns
- rmem_update(robj=<object object>, robj_gen=<object object>)
Update remote object on RPyC memory service hosts
- Parameters
robj (Any) – The remote object to use for update (One among robj, robj_gen should be passed).
robj_gen (Callable) – The remote object generator to use for update (One among robj, robj_gen should be passed).
- Returns
- rmem_delete()
Delete the mapping in RPyC memory service
- Returns
- next(*args, **kwargs)