Questions tagged [rpyc]

A transparent python library for symmetrical remote procedure calls, clustering and distributed-computing.

RPyC (IPA: /ɑɹ paɪ siː/, pronounced like are-pie-see), or Remote Python Call, is a transparent python library for symmetrical remote procedure calls, clustering and distributed-computing. RPyC makes use of object-proxying, a technique that employs python’s dynamic nature, to overcome the physical boundaries between processes and computers, so that remote objects can be manipulated as if they were local.

96 questions
25
votes
2 answers

Hook the global name lookup in a python interpreter

Here is the thing, I have a proxy holding the reference to a remote module, and I put some of these proxies to the sys.modules such that I can use it just like local modules. But some other objects are put in the __builtin__ module at the remote…
Joey.Z
  • 4,492
  • 4
  • 38
  • 63
16
votes
2 answers

What are the pros and cons of PyRo and RPyC python libs?

I am looking for a remote procedure call engine for Python and I've found that PyRo (Python Remote Object) and RPyC (Remote Python Call) are both the kind of thing I am searching for. However, I am curious to know how they compare to each other and…
edomaur
  • 1,397
  • 4
  • 23
  • 38
6
votes
0 answers

rpyc connection closed by peer

I'm following rpyc tutorials on this page but get EOFError when run this code bgsrv = rpyc.BgServingThread(conn) #creates a bg thread to process incoming events I've searched a lot but didn't find a way to fix this issue. The server and client run…
JohnnyHuo
  • 453
  • 7
  • 13
5
votes
1 answer

python RPyC user count

I wish to use RPyC to provide an API for a hardware board as a service. The board can only cater for a single user at a time. Is there any way I can get RPyC to enforce that only a single user can get access at a time?
Gregory Kuhn
  • 1,627
  • 2
  • 22
  • 34
5
votes
0 answers

Rpyc Python: Rpyc service thread start call is blocking

The server starts fine I can update values, but the hello world string is not printed. The program is stuck at t.start(), how can I make it non-blocking. import rpyc class rpyc_service(rpyc.Service): def on_connect(self): …
5
votes
2 answers

Multiprocessing Python with RPYC "ValueError: pickling is disabled"

I am trying to use the multiprocessing package within an rpyc service, but get ValueError: pickling is disabled when I try to call the exposed function from the client. I understand that the multiprocesing package uses pickling to pass information…
Michael
  • 13,244
  • 23
  • 67
  • 115
5
votes
1 answer

passing object in rpyc fails

I am trying to pass an object as a paramater using RPyC from the client to the server. But the server is unable to access the object and I receive an AttributeError. Server Code: class AgentService(rpyc.Service): def exposed_func(self, obj): …
Ben
  • 300
  • 2
  • 11
4
votes
0 answers

How can I pass an argument to the __init__() of an rpyc.SlaveService object?

This is my working code: class RPyCService(rpyc.SlaveService): def __init__(self, conn): super(RPyCService, self).__init__(conn) ... from rpyc.utils.server import ThreadedServer my_threaded_server = ThreadedServer(RPyCService,…
langlauf.io
  • 3,009
  • 2
  • 28
  • 45
4
votes
1 answer

PyScripter Rpyc

maybe somebody could give me a couple guidelines how to install Rpyc to PyScripter. I use PyScripter 1.9.9.7 with Python 2.6. I have tried to google it and found some instructions, but still have not succeeded... Thanks!
spacemonkey
  • 797
  • 2
  • 8
  • 7
4
votes
1 answer

rpyc.Service takes 10 seconds to receive a 150kB object (on localhost, no LAN issue)

I am building a big (150kB when pickled) dummy dictionary and running a dummy function on it that runs quickly and smoothly. When the same function is exposed via a rpyc.Service, the time taken becomes 10 seconds (instead of 0.0009 seconds), even if…
cybob10
  • 61
  • 4
4
votes
1 answer

Python rpyc can not run a psutil command remotely

I'm trying to run a psutil command remotely: import os, sys, time import rpyc import psutil command = """def rpcexecute(): import psutil cpu = psutil.cpu_percent(interval=1) return cpu""" conn =…
Junix
  • 195
  • 2
  • 13
3
votes
1 answer

rpyc AsyncResultTimeout("result expired")

I'm running classic rpyc server. And when I connect to server and perform long running command: rconn = rpyc.classic.connect(host='ip', port='18812') rsubprocess = rconn.modules.subprocess rsubprocess.check_output(['my command'],…
Arti
  • 7,356
  • 12
  • 57
  • 122
3
votes
0 answers

rpyc, how to handle disconnect and reconnect

using w10/64, python 3.6, rpyc I have a server receiving serial data and want the data to be published to any client asking for a connection. In the server I add every client into a connection list and when detecting changes in the data publish it…
juerg
  • 479
  • 5
  • 16
3
votes
2 answers

How to change a weak reference to a strong reference?

i connect to a client with RPyC and call a Service exposed method with a parameter object. I want to take this object from the exposed method and do somethings with it, but this object is weakly-referenced and at the time i want to access its data:…
Paula
  • 95
  • 1
  • 9
3
votes
1 answer

simple rpyc client and server for sending string data

I'm working on a program in python using rpyc. My goal is to create a simple server that accepts bytes of data (String) from a client. I'm new both to python and rpyc. Here is my server.py code: from rpyc.utils.server import ThreadedServer # or…
user3294601
  • 33
  • 1
  • 4
1
2 3 4 5 6 7