# -*- coding: utf-8 -*-
from setuptools import setup

packages = \
['aiobgjobs']

package_data = \
{'': ['*']}

install_requires = \
['pytz>=2022.7,<2023.0']

setup_kwargs = {
    'name': 'aiobgjobs',
    'version': '0.1.2',
    'description': 'This library is designed for asynchronous execution of scheduled tasks.',
    'long_description': "# AIOBGJOBS DOCS\n\n## En - docs\n\nThis library is designed for asynchronous \nexecution of scheduled tasks.\n\nSimple example:\n```python\nimport asyncio\nimport datetime\n\nfrom aiobgjobs.dispatcher import BgDispatcher\nfrom aiobgjobs.types import Every, Repeats\n\nbg_dp = BgDispatcher()\n\n\n@bg_dp.handler_job(\n    every=Every.seconds(15),\n    count_repeats=3\n)\nasync def simple_func_every_second():\n    print('Test')\n\n\n@bg_dp.handler_job(\n    every=Every.weekdays.monday(hour=11, minute=40),\n    count_repeats=Repeats.infinity\n)\nasync def simple_func_infinity_monday():\n    print('Test2')\n\n\n@bg_dp.handler_job(\n    every=Every.minutes(2),\n    count_repeats=Repeats.infinity\n)\nasync def simple_func_every_2_minutes():\n    print('Test3')\n\n\n@bg_dp.handler_job(\n    count_repeats=Repeats.one,\n    datetime_start=datetime.timedelta(minutes=2.0)\n)\nasync def simple_func_delta_to_start():\n    print('Test4')\n\n\nasync def main():\n    await asyncio.create_task(bg_dp.start(relax=.3))\n\n\nif __name__ == '__main__':\n    loop = asyncio.new_event_loop()\n    try:\n        loop.run_until_complete(main())\n    except KeyboardInterrupt:\n        print('Goodbye!')\n```\n\nExample without using decorators:\n```python\nimport asyncio\nimport datetime\n\nfrom aiobgjobs.dispatcher import BgDispatcher\nfrom aiobgjobs.handlers import Handler\nfrom aiobgjobs.jobs import Job\nfrom aiobgjobs.types import Every, Repeats\n\nbg_dp = BgDispatcher()\n\nasync def simple_func_every_seconds():\n    print('Test')\n\nasync def simple_func_infinity_monday():\n    print('Test2')\n\nasync def simple_func_every_2_minutes():\n    print('Test3')\n\nasync def simple_func_delta_to_start():\n    print('Test4')\n\n\nbg_dp.register_handler(\n    Handler(\n        job=Job(\n            func=simple_func_every_seconds,\n            name='Job - 1',\n            kwargs=None\n        ),\n        count_repeats=3,\n        every=Every.seconds(15)\n    )\n)\n\nbg_dp.register_handler(\n    Handler(\n        job=Job(\n            func=simple_func_infinity_monday,\n            name='Job - 2',\n            kwargs=None\n        ),\n        count_repeats=Repeats.infinity,\n        every=Every.weekdays.monday()\n    )\n)\n\nbg_dp.register_handler(\n    Handler(\n        job=Job(\n            func=simple_func_every_2_minutes,\n            name='Job - 3',\n            kwargs=None\n        ),\n        count_repeats=Repeats.infinity,\n        every=Every.minutes(2)\n    )\n)\n\nbg_dp.register_handler(\n    Handler(\n        job=Job(\n            func=simple_func_delta_to_start,\n            name='Job - 4',\n            kwargs=None\n        ),\n        count_repeats=Repeats.one,\n        datetime_start=datetime.timedelta(minutes=2)\n    )\n)\n\n\nasync def main():\n    await asyncio.create_task(bg_dp.start(relax=.3))\n\n\nif __name__ == '__main__':\n    loop = asyncio.new_event_loop()\n    try:\n        loop.run_until_complete(main())\n    except KeyboardInterrupt:\n        print('Goodbye!')\n```\n\n ## Ru - docs\n\nЭта библиотека предназначена для асинхронного \nвыполнения задач по расписанию.\n\nПростой пример:\n```python\nimport asyncio\nimport datetime\n\nfrom aiobgjobs.dispatcher import BgDispatcher\nfrom aiobgjobs.types import Every, Repeats\n\nbg_dp = BgDispatcher()\n\n\n@bg_dp.handler_job(\n    every=Every.seconds(15),\n    count_repeats=3\n)\nasync def simple_func_every_second():\n    print('Test')\n\n\n@bg_dp.handler_job(\n    every=Every.weekdays.monday(hour=11, minute=40),\n    count_repeats=Repeats.infinity\n)\nasync def simple_func_infinity_monday():\n    print('Test2')\n\n\n@bg_dp.handler_job(\n    every=Every.minutes(2),\n    count_repeats=Repeats.infinity\n)\nasync def simple_func_every_2_minutes():\n    print('Test3')\n\n\n@bg_dp.handler_job(\n    count_repeats=Repeats.one,\n    datetime_start=datetime.timedelta(minutes=2.0)\n)\nasync def simple_func_delta_to_start():\n    print('Test4')\n\n\nasync def main():\n    await asyncio.create_task(bg_dp.start(relax=.3))\n\n\nif __name__ == '__main__':\n    loop = asyncio.new_event_loop()\n    try:\n        loop.run_until_complete(main())\n    except KeyboardInterrupt:\n        print('Goodbye!')\n```\n\nПример без использования декораторов:\n```python\nimport asyncio\nimport datetime\n\nfrom aiobgjobs.dispatcher import BgDispatcher\nfrom aiobgjobs.handlers import Handler\nfrom aiobgjobs.jobs import Job\nfrom aiobgjobs.types import Every, Repeats\n\nbg_dp = BgDispatcher()\n\nasync def simple_func_every_seconds():\n    print('Test')\n\nasync def simple_func_infinity_monday():\n    print('Test2')\n\nasync def simple_func_every_2_minutes():\n    print('Test3')\n\nasync def simple_func_delta_to_start():\n    print('Test4')\n\n\nbg_dp.register_handler(\n    Handler(\n        job=Job(\n            func=simple_func_every_seconds,\n            name='Job - 1',\n            kwargs=None\n        ),\n        count_repeats=3,\n        every=Every.seconds(15)\n    )\n)\n\nbg_dp.register_handler(\n    Handler(\n        job=Job(\n            func=simple_func_infinity_monday,\n            name='Job - 2',\n            kwargs=None\n        ),\n        count_repeats=Repeats.infinity,\n        every=Every.weekdays.monday()\n    )\n)\n\nbg_dp.register_handler(\n    Handler(\n        job=Job(\n            func=simple_func_every_2_minutes,\n            name='Job - 3',\n            kwargs=None\n        ),\n        count_repeats=Repeats.infinity,\n        every=Every.minutes(2)\n    )\n)\n\nbg_dp.register_handler(\n    Handler(\n        job=Job(\n            func=simple_func_delta_to_start,\n            name='Job - 4',\n            kwargs=None\n        ),\n        count_repeats=Repeats.one,\n        datetime_start=datetime.timedelta(minutes=2)\n    )\n)\n\n\nasync def main():\n    await asyncio.create_task(bg_dp.start(relax=.3))\n\n\nif __name__ == '__main__':\n    loop = asyncio.new_event_loop()\n    try:\n        loop.run_until_complete(main())\n    except KeyboardInterrupt:\n        print('Goodbye!')\n```",
    'author': 'daniilsamraev',
    'author_email': 'shamraev.2002@gmail.com',
    'maintainer': 'None',
    'maintainer_email': 'None',
    'url': 'None',
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'python_requires': '>=3.11,<4.0',
}


setup(**setup_kwargs)
