Metadata-Version: 2.1
Name: muffin-donald
Version: 0.10.3
Summary: It's a plugin for Muffin framework which provides support for external APIs
Author-email: Kirill Klenov <horneds@gmail.com>
License: MIT License
Project-URL: homepage, https://github.com/klen/muffin-donald
Project-URL: repository, https://github.com/klen/muffin-donald
Keywords: muffin,asyncio,trio,curio
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Framework :: AsyncIO
Requires-Python: >=3.8
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: muffin (>=0.92)
Requires-Dist: donald (>=0.32.0)
Provides-Extra: dev
Requires-Dist: pre-commit ; extra == 'dev'
Requires-Dist: refurb ; extra == 'dev'
Requires-Dist: bump2version ; extra == 'dev'
Requires-Dist: muffin-sentry ; extra == 'dev'
Provides-Extra: tests
Requires-Dist: pytest ; extra == 'tests'
Requires-Dist: pytest-aio[curio,trio] ; extra == 'tests'
Requires-Dist: pytest-mypy ; extra == 'tests'
Requires-Dist: types-setuptools ; extra == 'tests'
Requires-Dist: ruff ; extra == 'tests'

Muffin-Donald
#############

.. _description:

**Muffin-Donald** -- Its a plugin for Muffin_ framework which provides support
for asyncronous tasks

.. _badges:

.. image:: https://github.com/klen/muffin-donald/workflows/tests/badge.svg
    :target: https://github.com/klen/muffin-donald/actions
    :alt: Tests Status

.. image:: https://img.shields.io/pypi/v/muffin-donald
    :target: https://pypi.org/project/muffin-donald/
    :alt: PYPI Version

.. image:: https://img.shields.io/pypi/pyversions/muffin-donald
    :target: https://pypi.org/project/muffin-donald/
    :alt: Python Versions

.. _contents:

.. contents::

.. _requirements:

Requirements
=============

- python >= 3.8

.. _installation:

Installation
=============

**Muffin-Donald** should be installed using pip: ::

    pip install muffin-donald

.. _usage:

Usage
=====


Initialize and setup the plugin:

.. code-block:: python

    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
--------------------------- --------------------------- ---------------------------
**log_level**               ``INFO``                    Logger Level
**log_config**              ``None``                    Logger config
**backend**                 ``'memory'``                Backend name (memory, redis, amqp)
**backend_params**          ``{}``                      Backend params
**worker_params**           ``{}``                      Worker params
**worker_lifespan**         ``False``                   Fun the application lifespan events with worker
**start_worker**            ``False``                   Auto start a worker in the current process
**start_scheduler**         ``False``                   Auto start a scheduler in the current process
=========================== =========================== ===========================


You are able to provide the options when you are initiliazing the plugin:

.. code-block:: python

    donald.setup(app, start_worker=True)


Or setup it inside ``Muffin.Application`` config using the ``TASKS_`` prefix:

.. code-block:: python

   TASKS_START_WORKER = True

``Muffin.Application`` configuration options are case insensitive


.. _bugtracker:

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:

Contributing
============

Development of Muffin-Donald happens at: https://github.com/klen/muffin-donald


Contributors
=============

* klen_ (Kirill Klenov)

.. _license:

License
========

Licensed under a `MIT license`_.

.. _links:


.. _klen: https://github.com/klen
.. _Muffin: https://github.com/klen/muffin

.. _MIT license: http://opensource.org/licenses/MIT
