It's a plugin for Muffin framework which provides support for external APIs
Project description
Muffin-Donald – Its a plugin for Muffin framework which provides support for asyncronous tasks
Requirements
python >= 3.7
Installation
Muffin-Donald should be installed using pip:
pip install muffin-donald
Usage
Initialize and setup the plugin:
import muffin
import muffin_donald
# Create Muffin Application
app = muffin.Application('example')
# Initialize the plugin
# As alternative: tasks = muffin_donald.Plugin(app, **options)
tasks = muffin_donald.Plugin()
donald.setup(app)
And etc
Options
Name |
Default value |
Desctiption |
autostart |
True |
Auto start tasks workers |
fake_mode |
False |
Run tasks immediately (testing) |
num_workers |
<CPU_COUNT> - 1 |
Number of workers |
max_tasks_per_worker |
100 |
Maximum concurent tasks per worker |
filelock |
None |
File lock path |
loglevel |
INFO |
Logger Level |
queue_exchange |
tasks |
Tasks queue exchange |
queue_name |
tasks |
Tasks queue name |
queue_params |
{} |
Queue params |
You are able to provide the options when you are initiliazing the plugin:
donald.setup(app, num_workers=2)
Or setup it inside Muffin.Application config using the DONALD_ prefix:
DONALD_ROOT_URL = 'https://api.github.com'
Muffin.Application configuration options are case insensitive
Bug tracker
If you have any suggestions, bug reports or annoyances please report them to the issue tracker at https://github.com/klen/muffin-donald/issues
Contributing
Development of Muffin-Donald happens at: https://github.com/klen/muffin-donald
Contributors
klen (Kirill Klenov)
License
Licensed under a MIT license.
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
Hashes for muffin_donald-0.6.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d5ab1c3936400baeb4207a5e1013d6ce37de30d1967e924c1fdb6a2d3e9df81 |
|
MD5 | ae5af945a624250c8682c0b00e8c58df |
|
BLAKE2b-256 | 09f8c9164abc6d4482df33f154e30268e572454c2a5f46b2ca48f5235b0d54be |