Skip to main content

Plugin system supporting multiple programming languages

Project description

MultiPlug

The MultiPlug library is used for creating flexible plugin systems for Python programs, supporting multiple programming languages.

For example, a CLI script based on this library can take the name of a module as one of its command line arguments and import and use the module. The user of the script will then select a plugin e.g. from a plugin collection or writing it according to a given API specification.

Features

Main features of the library:

  • the library allows the dynamic import of a plugin module, given its filename
  • plugins can be written in Python, Nim, Rust and Bash
  • the calling code is (in most cases) independent of the plugin implementation language
  • plugin modules are automatically (re-)compiled, when necessary (thanks to the nimporter and maturin libraries)
  • a wrapper mechanism allows to support Bash plugins
  • systems are provided for defining module-level constants when importing Nim and Rust modules
  • basic aspects of the plugin interface (names of the required and optional module-level public functions and constants) can be specified and automatically checked

Installation

The Python libraries listed in requirements.txt are installed automatically, if MultiPlug is installed using pip, and can otherwise be installed using pip install -r requirements.txt.

For supporting plugins written in Nim, the Nim compiler must be installed in the system and the nimpy library installed, e.g. using nimble install nimpy. Furthermore, for using the exportpy_consts macro in Nim plugins, run nimble install in the multiplug_nim directory.

For supporting plugins written in Rust, the Rust compiler must be installed in the system and the PyO3 library installed, e.g. using cargo install PyO3.

Usage

The usage of the library is explained in the user manual.

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

multiplug-1.2.tar.gz (22.6 kB view details)

Uploaded Source

Built Distribution

multiplug-1.2-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file multiplug-1.2.tar.gz.

File metadata

  • Download URL: multiplug-1.2.tar.gz
  • Upload date:
  • Size: 22.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for multiplug-1.2.tar.gz
Algorithm Hash digest
SHA256 9cac32f16c1077400133767aa39ebe356f5e808327a5d6a6eba611ac03ea4846
MD5 4a4d4705e2e970ab3e37c047bfd99869
BLAKE2b-256 1d7a5e5766781498b75c6fee7f103b813e3978bde7a251f498c7edb101a6d187

See more details on using hashes here.

File details

Details for the file multiplug-1.2-py3-none-any.whl.

File metadata

  • Download URL: multiplug-1.2-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for multiplug-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 48efa894f1b893a9ee141a57847fffb4d5023ccd020b7404264dadac8d5bceda
MD5 56e0c5f1e3e6200116860ade2fbf3e7c
BLAKE2b-256 ac9170e10fd3a2eb1e276f47e1578fcda19700e3571a8f28c53573a8951cedcc

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