Lite plugins for simple Python 3 projects
Project description
LTPlugins - Lite plugins for simple Python 3 projects
Installation
pip install ltplugins
Usage examples
Imagine there is a directory plugins with two scripts: ltp_example.py and ltp_test.py For simplicity they contain a single main function:
def main(*args, **kwargs):
print(args, kwargs)
LTPlugins could dynamically load them and unload during the runtime of the main script:
import ltplugins
p = ltplugins.LTPlugins(prefix='ltp_', path='plugins')
p.load('example')
p.load('test')
p.list(state='a', status=True)
p.name['example'].main('123', a=456)
p.run('test', 'main', '789', a=123)
p.unload('test')
p.reload('example')
Changelog
| Date | Version | Remarks |
|---|---|---|
| 2020.04.29 | v1.0.0 | Initial release |
| 2020.04.29 | v1.0.1 | setup.py fix for README.md |
| 2020.05.01 | v1.1.0 | List modules: all, loaded and unloaded |
| 2020.05.01 | v1.1.1 | Readme update |
| 2020.05.07 | v1.1.2 | Default status='a' in LTPlugins.list() |
| 2020.05.07 | v1.1.3 | LTPlugins.list() now returns module names |
| 2020.05.07 | v1.1.4 | LTPlugins.list(state='a', status=False) |
| 2020.05.07 | v1.1.4.1 | fnmatch module reference removed |
| 2020.05.07 | v1.1.5 | Dummy release to make PyPI happy |
On any issues, questions and suggestions contact me: Mikhail Zakharov zmey20000@yahoo.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ltplugins-1.1.5.tar.gz.
File metadata
- Download URL: ltplugins-1.1.5.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.44.0 CPython/3.8.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1711e8950c880359f5722abe165c0a1b10cbc9fba4cde83441fb33b6232ca77a
|
|
| MD5 |
e3fef4719c9c36b7b7d26b039d1149c0
|
|
| BLAKE2b-256 |
58f1e47330645e93e0115d3f60a02a6407f51890730f71a43c44dfb1626a8fa1
|
File details
Details for the file ltplugins-1.1.5-py3-none-any.whl.
File metadata
- Download URL: ltplugins-1.1.5-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.44.0 CPython/3.8.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6315139567148805a453128fcda9e7b707dd4ec40b49a4b22626803ccabaa065
|
|
| MD5 |
836a991bd3e4a42eb36a1c5ed52f8fa5
|
|
| BLAKE2b-256 |
d0b30f7827efc4656c443ad92635cb9c7b265ce2825c746fd31ed649e8a2c442
|