Package: asyncz
Asyncz🚀 The scheduler that simply works. 🚀Documentation:https://asyncz.tarsild.io📚Source Code:https://github.com/tarsil/asynczAsyncz is a scheduler for any ASGI application that needs to have those complicated scheduled operations with the
best of what pydantic can offer.MotivationNowadays 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 Asynczdoes not aim to replaceit, instead
is a more focused and optimised solution for async and ASGI frameworks out there.See thevendorsfor more details.LoggingWe 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 ASGIWhat 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 asEsmerald, FastAPI, Starlette, Starlite, Quart... You can pick one and go for it.Asyncz comes with special support toEsmeraldfor 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 thecontributingsection.ConceptsLike APScheduler, Asyncz also brings four kinds of components:SchedulersTriggersStoresExecutorsRequirementsPython 3.7+Asyncz wouldn't be possible without two giants:APSchedulerPydanticInstallation$pipinstallasynczThe right decisionsHow do you know if you are choosing the rightscheduler,triggers,storesandexecutors?Well, Asyncz is intentionally designed for specific systems and already helps you out with some of
those questions.Schedulers- Natively only supports theAsyncIOScheduler.Triggers- Here it will depend of the periocidity of our tasks. Example:CronTrigger- UNIX like cron and gives you the same feeling as
scheduling a task on a native UNIX like based system.DateTrigger- When you need to run a task once on a specific
point of time.IntervalTrigger- When you need to run tasks in specific
intervals of time.OrTrigger/AndTrigger- If you would
like to combine more than one trigger (cron, interval and date) together.Stores- Natively only supportsredis,mongoandmemory.Executors- Natively only supportsAsyncIOExecutor,ThreadPoolExecutorandProcessPoolExecutor.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 schedulerDue its simplificy, Asyncz provides some ways of configuring the scheduler for you.First way:fromasyncz.schedulers.asyncioimportAsyncIOSchedulerscheduler=AsyncIOScheduler()Second way:fromasyncz.schedulersimportAsyncIOSchedulerscheduler=AsyncIOScheduler()Initialize the rest of the application after theschedulerinitialisation.
Moredetailscan 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 supportAsyncz currently supports theEsmerald frameworkand 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 thecontributingsection and see how you can
do it.SponsorsCurrently there are no sponsors ofAsynczbut you can financially help and support the author thoughGitHub sponsorsand become aSpecial oneor aLegend.