Skip to main content

import proxying for rpyc

Project description

rpyc import bridge

import modules over rpyc.

this is a terrible hack and nobody should use it.

client

from rpyc_import_bridge import ImportBridge

bridge = ImportBridge(rpyc_connection)

# imports now work naturally
from numpy import array
from mymodule.things import Function

by default, the bridge only intercepts modules that are missing locally. pass module names to force remote even if a local copy exists:

bridge = ImportBridge(rpyc_connection, "mypackage1", "mypackage2")

server

class Service(rpyc.Service):
    def exposed_import_module(self, module_name):
        import importlib
        return importlib.import_module(module_name)

testing

uv run python ./test/server/test_server.py
uv run python ./test/client/test_suite.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rpyc_import_bridge-0.2.0.tar.gz (26.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rpyc_import_bridge-0.2.0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file rpyc_import_bridge-0.2.0.tar.gz.

File metadata

  • Download URL: rpyc_import_bridge-0.2.0.tar.gz
  • Upload date:
  • Size: 26.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.14.1 Darwin/24.6.0

File hashes

Hashes for rpyc_import_bridge-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a1aa3241aa068f61339b17251146d91e2625e25f4823ed0bcbbdff8c265365ce
MD5 95a50127057829126a64d8cdb3085f16
BLAKE2b-256 f8063fd47e24b37bfc62064a2d83c659fb388bed707f29ce970d6bb8b8a815ff

See more details on using hashes here.

File details

Details for the file rpyc_import_bridge-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: rpyc_import_bridge-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.14.1 Darwin/24.6.0

File hashes

Hashes for rpyc_import_bridge-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d2d325d9e2ea78a69ff26d871ebecf34e1c8812cb3335577451fc1475f66c693
MD5 ce400cce018fb923f147f2cf09050c44
BLAKE2b-256 882f56b7cb9debeb02773d1c3b5df304788ccc7aaa4c7708767ca718b6a2ca32

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page