Skip to main content

simple import with python path management

Project description

simport

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.

Source Distribution

simport-0.2.dev16.tar.gz (7.8 kB view details)

Uploaded Source

File details

Details for the file simport-0.2.dev16.tar.gz.

File metadata

File hashes

Hashes for simport-0.2.dev16.tar.gz
Algorithm Hash digest
SHA256 361d74ac2ecfcf98ecb7c6edff616b666c9d87271b6d5a397f043618ffdd77a7
MD5 f59f169fd9b4776bf1b13881b664b0bb
BLAKE2b-256 7b954a550f1bc8ccc7562d115ebefca4d76332d90e9d7aa157e7425973a4fdfc

See more details on using hashes here.

Supported by

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