Skip to main content

simple import with python path management

Project description


Simple Import Library for Python

Supports importing functions or class methods from files not in the Python Path.

Using Simport

import simport

# For modules already in the Python Path function = simport.load(‘mymodule.myfunction’) class_method = simport.load(‘mymodule:MyClass.mymethod’) klass = simport.load(‘mymodule:MyClass’) # uninstanstiated.

# For modules not in the Python Path function = simport.load(‘/path/to/dir|module_name:myfunction’) class_method = simport.load(‘/path/to/dir|module_name:MyClass.mymethod’)

Look at the tests for some interesting naming conventions for specifying relative modules, etc.

Running Tests

From the simport root directory, run tox

Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
simport-0.2.dev16.tar.gz (7.8 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page