asyncz


Nameasyncz JSON
Version 0.6.0 PyPI version JSON
download
home_pageNone
SummaryThe scheduler that nobody wants but every application needs.
upload_time2024-04-29 09:40:07
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords api apscheduler asgi asyncz cron fastapi framework http machine learning ml openapi pydantic rest scheduler starlette websocket
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Asyncz

<p align="center">
  <a href="https://asyncz.tarsil.io"><img src="https://res.cloudinary.com/tarsild/image/upload/v1687363326/packages/asyncz/asyncz-new_wiyih8.png" alt='Asyncz'></a>
</p>

<p align="center">
    <em>🚀 The scheduler that simply works. 🚀</em>
</p>

<p align="center">
<a href="https://github.com/tarsil/asyncz/workflows/Test%20Suite/badge.svg?event=push&branch=main" target="_blank">
    <img src="https://github.com/tarsil/asyncz/workflows/Test%20Suite/badge.svg?event=push&branch=main" alt="Test Suite">
</a>

<a href="https://pypi.org/project/asyncz" target="_blank">
    <img src="https://img.shields.io/pypi/v/asyncz?color=%2334D058&label=pypi%20package" alt="Package version">
</a>

<a href="https://pypi.org/project/asyncz" target="_blank">
    <img src="https://img.shields.io/pypi/pyversions/asyncz.svg?color=%2334D058" alt="Supported Python versions">
</a>
</p>

---

**Documentation**: [https://asyncz.tarsild.io](https://asyncz.tarsild.io) 📚

**Source Code**: [https://github.com/tarsil/asyncz](https://github.com/tarsil/asyncz)

---

Asyncz is a scheduler for any ASGI application that needs to have those complicated scheduled operations with the
best of what pydantic can offer.

## Motivation

Nowadays using async frameworks with python is somewhat common and becoming even more mainstream. A lot of applications
usually need a complex stack of technologies to fullfil their needs and directly or indirectly, a scheduler.

There are great frameworks out there that do the task extremely well, the best example is APScheduler, which is where
Asyncz came from.

To be even more honest, Asyncz is a revamp of APScheduler. Without the APScheduler there is no Asyncz, so much that
even the APScheduler tests are used within asyncz. That is how great APScheduler is!

So what was the reason why recreating another similar version of APScheduler? Well, it is not entirely the same
thing. Asyncz was designed to work only with ASGI and AsyncIO as well as integrating pydantic and bring the modern
python into the table.

APScheduler is widely used by millions of python developers and Asyncz **does not aim to replace** it, instead
is a more focused and optimised solution for async and ASGI frameworks out there.

See the [vendors](./vendors/apscheduler/README.md) for more details.

## Logging

We all struggle with the logging and the configurations and with that in mind Asyncz comes with natice support
for loguru.

This will make the logging a lot easier to understand and clear to read.

## Async and ASGI

What does this mean? Well, Asyncz does not need to run inside any specific framework, actually you can use it
completely indepent from any framework as well as inside ASGI frameworks such as
[Esmerald](https://esmerald.dymmond.com), FastAPI, Starlette, Starlite, Quart... You can pick one and go for it.

Asyncz comes with special support to [Esmerald](https://esmerald.dymmond.com) for the simple reason that the author is
the same but it can be added more support. If you are interested in adding support to your favourite frameworks then
see the [contributing](https://asyncz.tarsild.io/contributing.md) section.

## Concepts

Like APScheduler, Asyncz also brings four kinds of components:

* [Schedulers](https://asyncz.tarsild.io/schedulers.md)
* [Triggers](https://asyncz.tarsild.io/triggers.md)
* [Stores](https://asyncz.tarsild.io/stores.md)
* [Executors](https://asyncz.tarsild.io/executors.md)

## Requirements

* Python 3.7+

Asyncz wouldn't be possible without two giants:

* <a href="https://apscheduler.readthedocs.io/en/3.x/" class="external-link" target="_blank">APScheduler</a>
* <a href="https://pydantic-docs.helpmanual.io/" class="external-link" target="_blank">Pydantic</a>

## Installation

```shell
$ pip install asyncz
```

## The right decisions

How do you know if you are choosing the right [scheduler](https://asyncz.tarsild.io/schedulers.md),
[triggers](https://asyncz.tarsild.io/triggers.md), [stores](https://asyncz.tarsild.io/stores.md)
and [executors](https://asyncz.tarsild.io/executors.md)?

Well, Asyncz is intentionally designed for specific systems and already helps you out with some of
those questions.

* **Schedulers** - Natively only supports the [AsyncIOScheduler](https://asyncz.tarsild.io/schedulers.md#asyncioscheduler).
* **Triggers** - Here it will depend of the periocidity of our tasks. Example:
    * [CronTrigger](https://asyncz.tarsild.io/triggers.md#crontrigger) - UNIX like cron and gives you the same feeling as
scheduling a task on a native UNIX like based system.
    * [DateTrigger](https://asyncz.tarsild.io/triggers.md#datetrigger) - When you need to run a task once on a specific
point of time.
    * [IntervalTrigger](https://asyncz.tarsild.io/triggers.md#intervaltrigger) - When you need to run tasks in specific
intervals of time.
    * [OrTrigger](https://asyncz.tarsild.io/triggers.md#ortrigger)/[AndTrigger](https://asyncz.tarsild.io/triggers.md#andtrigger) - If you would
like to combine more than one trigger (cron, interval and date) together.
* **Stores** - Natively only supports [redis](https://asyncz.tarsild.io/stores.md#redisstore),
[mongo](https://asyncz.tarsild.io/stores.md#mongodbstore) and [memory](https://asyncz.tarsild.io/stores.md#memorystore).
* **Executors** - Natively only supports [AsyncIOExecutor](https://asyncz.tarsild.io/executors.md#asyncioexecutor),
[ThreadPoolExecutor](https://asyncz.tarsild.io/executors.md#threadpoolexecutor) and
[ProcessPoolExecutor](https://asyncz.tarsild.io/executors.md#processpoolexecutor).

Sometimes having a lot of options makes the decision making very hard and Asyncz is intentionally
designed and driven to simplify and for specific use cases but is not limited to those. In every
section you have the option of uilding your own stores, executors, triggers and schedulers.

## Configuring the scheduler

Due its simplificy, Asyncz provides some ways of configuring the scheduler for you.

First way:

```python
from asyncz.schedulers.asyncio import AsyncIOScheduler

scheduler = AsyncIOScheduler()
```

Second way:

```python
from asyncz.schedulers import AsyncIOScheduler

scheduler = AsyncIOScheduler()
```

Initialize the rest of the application after the `scheduler` initialisation.
More [details](https://asyncz.tarsild.io/schedulers.md) can be found with more thorough explanations.

This is in simple terms and in a nutshell how to start with Asyncz quickly. For more information,
details and examples how to leverage Asyncz simply navigate through the documentation and have
fun 😁🎉.

## ASGI support

Asyncz currently supports the [Esmerald framework](https://asyncz.tarsild.io/contrib/esmerald/index.md)
and brings some batteries that are currently used by the framework and leveraging Asyncz.

If you wish to have support to any other framework such as FastAPI, Starlite, Starlette or
literally any other, check the [contributing](https://asyncz.tarsild.io/contributing.md) section and see how you can
do it.

## Sponsors

Currently there are no sponsors of **Asyncz** but you can financially help and support the author though
[GitHub sponsors](https://github.com/sponsors/tarsil) and become a **Special one** or a **Legend**.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "asyncz",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "api, apscheduler, asgi, asyncz, cron, fastapi, framework, http, machine learning, ml, openapi, pydantic, rest, scheduler, starlette, websocket",
    "author": null,
    "author_email": "Tiago Silva <tiago.arasilva@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/bc/b4/69c68814c3b23ca1a50040e28d4764cbc4111d1b444695a6ce0d153aa67f/asyncz-0.6.0.tar.gz",
    "platform": null,
    "description": "# Asyncz\n\n<p align=\"center\">\n  <a href=\"https://asyncz.tarsil.io\"><img src=\"https://res.cloudinary.com/tarsild/image/upload/v1687363326/packages/asyncz/asyncz-new_wiyih8.png\" alt='Asyncz'></a>\n</p>\n\n<p align=\"center\">\n    <em>\ud83d\ude80 The scheduler that simply works. \ud83d\ude80</em>\n</p>\n\n<p align=\"center\">\n<a href=\"https://github.com/tarsil/asyncz/workflows/Test%20Suite/badge.svg?event=push&branch=main\" target=\"_blank\">\n    <img src=\"https://github.com/tarsil/asyncz/workflows/Test%20Suite/badge.svg?event=push&branch=main\" alt=\"Test Suite\">\n</a>\n\n<a href=\"https://pypi.org/project/asyncz\" target=\"_blank\">\n    <img src=\"https://img.shields.io/pypi/v/asyncz?color=%2334D058&label=pypi%20package\" alt=\"Package version\">\n</a>\n\n<a href=\"https://pypi.org/project/asyncz\" target=\"_blank\">\n    <img src=\"https://img.shields.io/pypi/pyversions/asyncz.svg?color=%2334D058\" alt=\"Supported Python versions\">\n</a>\n</p>\n\n---\n\n**Documentation**: [https://asyncz.tarsild.io](https://asyncz.tarsild.io) \ud83d\udcda\n\n**Source Code**: [https://github.com/tarsil/asyncz](https://github.com/tarsil/asyncz)\n\n---\n\nAsyncz is a scheduler for any ASGI application that needs to have those complicated scheduled operations with the\nbest of what pydantic can offer.\n\n## Motivation\n\nNowadays using async frameworks with python is somewhat common and becoming even more mainstream. A lot of applications\nusually need a complex stack of technologies to fullfil their needs and directly or indirectly, a scheduler.\n\nThere are great frameworks out there that do the task extremely well, the best example is APScheduler, which is where\nAsyncz came from.\n\nTo be even more honest, Asyncz is a revamp of APScheduler. Without the APScheduler there is no Asyncz, so much that\neven the APScheduler tests are used within asyncz. That is how great APScheduler is!\n\nSo what was the reason why recreating another similar version of APScheduler? Well, it is not entirely the same\nthing. Asyncz was designed to work only with ASGI and AsyncIO as well as integrating pydantic and bring the modern\npython into the table.\n\nAPScheduler is widely used by millions of python developers and Asyncz **does not aim to replace** it, instead\nis a more focused and optimised solution for async and ASGI frameworks out there.\n\nSee the [vendors](./vendors/apscheduler/README.md) for more details.\n\n## Logging\n\nWe all struggle with the logging and the configurations and with that in mind Asyncz comes with natice support\nfor loguru.\n\nThis will make the logging a lot easier to understand and clear to read.\n\n## Async and ASGI\n\nWhat does this mean? Well, Asyncz does not need to run inside any specific framework, actually you can use it\ncompletely indepent from any framework as well as inside ASGI frameworks such as\n[Esmerald](https://esmerald.dymmond.com), FastAPI, Starlette, Starlite, Quart... You can pick one and go for it.\n\nAsyncz comes with special support to [Esmerald](https://esmerald.dymmond.com) for the simple reason that the author is\nthe same but it can be added more support. If you are interested in adding support to your favourite frameworks then\nsee the [contributing](https://asyncz.tarsild.io/contributing.md) section.\n\n## Concepts\n\nLike APScheduler, Asyncz also brings four kinds of components:\n\n* [Schedulers](https://asyncz.tarsild.io/schedulers.md)\n* [Triggers](https://asyncz.tarsild.io/triggers.md)\n* [Stores](https://asyncz.tarsild.io/stores.md)\n* [Executors](https://asyncz.tarsild.io/executors.md)\n\n## Requirements\n\n* Python 3.7+\n\nAsyncz wouldn't be possible without two giants:\n\n* <a href=\"https://apscheduler.readthedocs.io/en/3.x/\" class=\"external-link\" target=\"_blank\">APScheduler</a>\n* <a href=\"https://pydantic-docs.helpmanual.io/\" class=\"external-link\" target=\"_blank\">Pydantic</a>\n\n## Installation\n\n```shell\n$ pip install asyncz\n```\n\n## The right decisions\n\nHow do you know if you are choosing the right [scheduler](https://asyncz.tarsild.io/schedulers.md),\n[triggers](https://asyncz.tarsild.io/triggers.md), [stores](https://asyncz.tarsild.io/stores.md)\nand [executors](https://asyncz.tarsild.io/executors.md)?\n\nWell, Asyncz is intentionally designed for specific systems and already helps you out with some of\nthose questions.\n\n* **Schedulers** - Natively only supports the [AsyncIOScheduler](https://asyncz.tarsild.io/schedulers.md#asyncioscheduler).\n* **Triggers** - Here it will depend of the periocidity of our tasks. Example:\n    * [CronTrigger](https://asyncz.tarsild.io/triggers.md#crontrigger) - UNIX like cron and gives you the same feeling as\nscheduling a task on a native UNIX like based system.\n    * [DateTrigger](https://asyncz.tarsild.io/triggers.md#datetrigger) - When you need to run a task once on a specific\npoint of time.\n    * [IntervalTrigger](https://asyncz.tarsild.io/triggers.md#intervaltrigger) - When you need to run tasks in specific\nintervals of time.\n    * [OrTrigger](https://asyncz.tarsild.io/triggers.md#ortrigger)/[AndTrigger](https://asyncz.tarsild.io/triggers.md#andtrigger) - If you would\nlike to combine more than one trigger (cron, interval and date) together.\n* **Stores** - Natively only supports [redis](https://asyncz.tarsild.io/stores.md#redisstore),\n[mongo](https://asyncz.tarsild.io/stores.md#mongodbstore) and [memory](https://asyncz.tarsild.io/stores.md#memorystore).\n* **Executors** - Natively only supports [AsyncIOExecutor](https://asyncz.tarsild.io/executors.md#asyncioexecutor),\n[ThreadPoolExecutor](https://asyncz.tarsild.io/executors.md#threadpoolexecutor) and\n[ProcessPoolExecutor](https://asyncz.tarsild.io/executors.md#processpoolexecutor).\n\nSometimes having a lot of options makes the decision making very hard and Asyncz is intentionally\ndesigned and driven to simplify and for specific use cases but is not limited to those. In every\nsection you have the option of uilding your own stores, executors, triggers and schedulers.\n\n## Configuring the scheduler\n\nDue its simplificy, Asyncz provides some ways of configuring the scheduler for you.\n\nFirst way:\n\n```python\nfrom asyncz.schedulers.asyncio import AsyncIOScheduler\n\nscheduler = AsyncIOScheduler()\n```\n\nSecond way:\n\n```python\nfrom asyncz.schedulers import AsyncIOScheduler\n\nscheduler = AsyncIOScheduler()\n```\n\nInitialize the rest of the application after the `scheduler` initialisation.\nMore [details](https://asyncz.tarsild.io/schedulers.md) can be found with more thorough explanations.\n\nThis is in simple terms and in a nutshell how to start with Asyncz quickly. For more information,\ndetails and examples how to leverage Asyncz simply navigate through the documentation and have\nfun \ud83d\ude01\ud83c\udf89.\n\n## ASGI support\n\nAsyncz currently supports the [Esmerald framework](https://asyncz.tarsild.io/contrib/esmerald/index.md)\nand brings some batteries that are currently used by the framework and leveraging Asyncz.\n\nIf you wish to have support to any other framework such as FastAPI, Starlite, Starlette or\nliterally any other, check the [contributing](https://asyncz.tarsild.io/contributing.md) section and see how you can\ndo it.\n\n## Sponsors\n\nCurrently there are no sponsors of **Asyncz** but you can financially help and support the author though\n[GitHub sponsors](https://github.com/sponsors/tarsil) and become a **Special one** or a **Legend**.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "The scheduler that nobody wants but every application needs.",
    "version": "0.6.0",
    "project_urls": {
        "Changelog": "https://asyncz.tarsild.io/release-notes/",
        "Documentation": "https://asyncz.tarsild.io/",
        "Funding": "https://github.com/sponsors/tarsil",
        "Homepage": "https://github.com/tarsil/asyncz",
        "Source": "https://github.com/tarsil/asyncz"
    },
    "split_keywords": [
        "api",
        " apscheduler",
        " asgi",
        " asyncz",
        " cron",
        " fastapi",
        " framework",
        " http",
        " machine learning",
        " ml",
        " openapi",
        " pydantic",
        " rest",
        " scheduler",
        " starlette",
        " websocket"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "432b5b0345ce083b339c6c0d548851ac7b7f4e980fbc5abaef456af155df433b",
                "md5": "51391a277c74e7d6b16a33046fd6f2c6",
                "sha256": "442769a9890fddef478df3133d11bfcdcc7bce358c3f36b902eb5da9b2b768b6"
            },
            "downloads": -1,
            "filename": "asyncz-0.6.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "51391a277c74e7d6b16a33046fd6f2c6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 55438,
            "upload_time": "2024-04-29T09:40:04",
            "upload_time_iso_8601": "2024-04-29T09:40:04.987897Z",
            "url": "https://files.pythonhosted.org/packages/43/2b/5b0345ce083b339c6c0d548851ac7b7f4e980fbc5abaef456af155df433b/asyncz-0.6.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bcb469c68814c3b23ca1a50040e28d4764cbc4111d1b444695a6ce0d153aa67f",
                "md5": "faa9d66b3a10939105f1f8869191dd1b",
                "sha256": "d13f5e65a28786910686b063b84f7642b7efc92710649e070184af7824cdd4dc"
            },
            "downloads": -1,
            "filename": "asyncz-0.6.0.tar.gz",
            "has_sig": false,
            "md5_digest": "faa9d66b3a10939105f1f8869191dd1b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 38935,
            "upload_time": "2024-04-29T09:40:07",
            "upload_time_iso_8601": "2024-04-29T09:40:07.081643Z",
            "url": "https://files.pythonhosted.org/packages/bc/b4/69c68814c3b23ca1a50040e28d4764cbc4111d1b444695a6ce0d153aa67f/asyncz-0.6.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-29 09:40:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sponsors",
    "github_project": "tarsil",
    "github_not_found": true,
    "lcname": "asyncz"
}
        
Elapsed time: 0.24459s