Skip to content

kiranmantri/python-remote-import

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-remote-import

Enable the Python import subsystem to load libraries from remote (e.g. HTTP, S3, SSH).

Install from pip

pip install -U remote_import

Usage

HTTP

Optionally, start a webserver, to test HTTP Remote Import:

git clone git@github.com:kiranmantri/python-remote-import
cd python-remote-import
python -m http.server 7777
from remote_import import RemoteImporter

RemoteImporter.add_remote(
    namespaces=['test_package'],
    base_url='http://0.0.0.0:7777/examples'
    )

from test_package.a import main
print(main())

from test_package.b import value
value

Github

from remote_import import RemoteImporter

RemoteImporter.add_remote(
    namespaces=["test_package"],
    base_url ='github://kiranmantri:python-remote-import@/examples'
    )

S3

from remote_import import RemoteImporter

RemoteImporter.add_remote(
    namespaces=["test_package"],
    base_url ='s3://bucket/folder'
    )

Install from source

git clone git@github.com:kiranmantri/python-remote-import.git
cd python-remote-import
python install .

Build

git clone git@github.com:kiranmantri/python-remote-import.git
cd python-remote-import
python setup.py bdist_wheel

About

A Python library that enables the internal import subsystem to load other libraries from remote (e.g. HTTP, S3, SSH).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages