Micro-dev
Micro-dev is the only thing needed to create plugins for Micro and use the Micro’s endpoints to send tasks.
Installation
PyPi:
$ pip install micro-dev
Development version:
$ git clone git@github.com:humu1us/micro-dev.git: $ cd micro-dev $ pip install .
or direct from repository:
$ pip install git+ssh://git@github.com/humu1us/micro-dev.git
Usage
Create Plugins
Write a Micro plugin is very simple. All that you need to do is create a file named interface.py which defines the plugin as follow:
from micro.plugin.pluginbase import PluginBase
from micro.plugin.pluginbase import PluginDescription
class ExamplePlugin(PluginBase):
def __init__(self):
print("This is an example plugin")
# This is the method executed by Micro
def run(self, name):
return "Hello " + name + "!!!"
# This description is required by Micro
plugin = PluginDescription(
instance=ExamplePlugin,
name="Example Plugin",
author="Jhon Doe",
description="A very simple example plugin",
long_description="This plugin is a very simple example, "
"for that reason, we don't have a long description",
plugin_help="Params: name type string; A name to greet"
)
Send tasks
>>> from micro.api.endpoints import Requests
>>>
>>> req = Requests(BROKER_URL, QUEUE_NAME)
>>>
>>> req.plugins.delay().wait()
{'Example plugin': 'A very simple example plugin'}
>>>
>>> req.run.delay("Example plugin", name="Micro").wait()
'Hello Micro!!!'
Metadata
Release files for Micro-dev 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| Micro-dev-2.1.0.tar.gz | 3.6 kB | Without provenance | Details for Micro-dev-2.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| Micro_dev-2.1.0-py3-none-any.whl | Python 3 | none | any | Details for Micro_dev-2.1.0-py3-none-any.whl |
Total release size: 8.5 kB
Release files / Micro-dev-2.1.0.tar.gz
| Download URL | Micro-dev-2.1.0.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6806f62814894b98639de769ebcb63a7a458ce91d17ec1917fe15bbbf762dc56
|
|
BLAKE2b-256 checksum How to use checksums |
8034397cfaa1a1bd0de4e698a96cb7ae6acdf2ffd0d1c58bc740866b71394475
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.9.1 pkginfo/1.4.1 requests/2.18.4 setuptools/28.8.0 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/3.6.5
|
Release files / Micro_dev-2.1.0-py3-none-any.whl
| Download URL | Micro_dev-2.1.0-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
66df9ca78889e411c204b33ebcd3e9fd06d5ac7706ccf8b125fdd0df1e5e1204
|
|
BLAKE2b-256 checksum How to use checksums |
f1e05da16ee9aea796f96f8f06a59ce3bcf6ed4e77ebb32aec287529f7bac6d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.9.1 pkginfo/1.4.1 requests/2.18.4 setuptools/28.8.0 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/3.6.5
|
Security for Micro-dev 2.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.