All Projects → aio-libs → Aiojobs

aio-libs / Aiojobs

Licence: other
Jobs scheduler for managing background task (asyncio)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Aiojobs

aiodogstatsd
An asyncio-based client for sending metrics to StatsD with support of DogStatsD extension
Stars: ✭ 26 (-94.72%)
Mutual labels:  aiohttp, asyncio
binance-chain-python
Binance chain SDK in Python
Stars: ✭ 22 (-95.53%)
Mutual labels:  aiohttp, asyncio
rigor
HTTP-based DSL for for validating RESTful APIs
Stars: ✭ 65 (-86.79%)
Mutual labels:  aiohttp, asyncio
dvhb-hybrid
A package to mix django and asyncio in one application
Stars: ✭ 45 (-90.85%)
Mutual labels:  aiohttp, asyncio
Aiodocker
Python Docker API client based on asyncio and aiohttp
Stars: ✭ 288 (-41.46%)
Mutual labels:  asyncio, aiohttp
aiohttp-jwt
aiohttp middleware and helper utils for working with JSON web token.
Stars: ✭ 70 (-85.77%)
Mutual labels:  aiohttp, asyncio
aiohttp traversal
Traversal based router for aiohttp.web
Stars: ✭ 21 (-95.73%)
Mutual labels:  aiohttp, asyncio
fbemissary
A bot framework for the Facebook Messenger platform, built on asyncio and aiohttp
Stars: ✭ 30 (-93.9%)
Mutual labels:  aiohttp, asyncio
Aioresponses
Aioresponses is a helper for mock/fake web requests in python aiohttp package.
Stars: ✭ 278 (-43.5%)
Mutual labels:  asyncio, aiohttp
Python3 Concurrency Pics 02
爬取 www.mzitu.com 全站图片,截至目前共5162个图集,16.5万多张美女图片,使用 asyncio 和 aiohttp 实现的异步版本只需要不到2小时就能爬取完成。按日期创建图集目录,保存更合理。控制台只显示下载的进度条,详细信息保存在日志文件中。支持异常处理,不会终止爬虫程序。失败的请求,下次再执行爬虫程序时会自动下载
Stars: ✭ 275 (-44.11%)
Mutual labels:  asyncio, aiohttp
website
PySlackers website for invites and learning resources
Stars: ✭ 61 (-87.6%)
Mutual labels:  aiohttp, asyncio
Diy Async Web Framework
Learn how modern async web frameworks work, by writing simple clone from scratch
Stars: ✭ 309 (-37.2%)
Mutual labels:  asyncio, aiohttp
glQiwiApi
The ultrarapid and multifunctional wrapper over QIWI and YooMoney
Stars: ✭ 44 (-91.06%)
Mutual labels:  aiohttp, asyncio
waio
Is a pretty simple and fully asynchronous framework for WhatsApp Business API written in Python 3.7 with asyncio and aiohttp.
Stars: ✭ 18 (-96.34%)
Mutual labels:  aiohttp, asyncio
feedsearch-crawler
Crawl sites for RSS, Atom, and JSON feeds.
Stars: ✭ 23 (-95.33%)
Mutual labels:  aiohttp, asyncio
aiohttp-socks
Proxy (HTTP, SOCKS) connector for aiohttp
Stars: ✭ 147 (-70.12%)
Mutual labels:  aiohttp, asyncio
aiohttp-mako
mako template renderer for aiohttp.web
Stars: ✭ 32 (-93.5%)
Mutual labels:  aiohttp, asyncio
pyladies-courseware
Homework/task submit and review web app · based on React and Python aiohttp
Stars: ✭ 14 (-97.15%)
Mutual labels:  aiohttp, asyncio
Web Main
🎉 Ultimate Emoji Generator
Stars: ✭ 261 (-46.95%)
Mutual labels:  asyncio, aiohttp
Python Slack Sdk
Slack Developer Kit for Python
Stars: ✭ 3,307 (+572.15%)
Mutual labels:  asyncio, aiohttp

======= aiojobs

.. image:: https://travis-ci.org/aio-libs/aiojobs.svg?branch=master :target: https://travis-ci.org/aio-libs/aiojobs .. image:: https://codecov.io/gh/aio-libs/aiojobs/branch/master/graph/badge.svg :target: https://codecov.io/gh/aio-libs/aiojobs .. image:: https://img.shields.io/pypi/v/aiojobs.svg :target: https://pypi.python.org/pypi/aiojobs .. image:: https://readthedocs.org/projects/aiojobs/badge/?version=latest :target: http://aiojobs.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status .. image:: https://badges.gitter.im/Join%20Chat.svg :target: https://gitter.im/aio-libs/Lobby :alt: Chat on Gitter

Jobs scheduler for managing background task (asyncio)

The library gives controlled way for scheduling background tasks for asyncio applications.

Installation

.. code-block:: bash

$ pip3 install aiojobs

Usage example

.. code-block:: python

import asyncio import aiojobs

async def coro(timeout): await asyncio.sleep(timeout)

async def main(): scheduler = await aiojobs.create_scheduler() for i in range(100): # spawn jobs await scheduler.spawn(coro(i/10))

   await asyncio.sleep(5.0)
   # not all scheduled jobs are finished at the moment

   # gracefully close spawned jobs
   await scheduler.close()

asyncio.get_event_loop().run_until_complete(main())

Integration with aiohttp.web

.. code-block:: python

from aiohttp import web from aiojobs.aiohttp import setup, spawn

async def handler(request): await spawn(request, coro()) return web.Response()

app = web.Application() app.router.add_get('/', handler) setup(app)

or just

.. code-block:: python

from aiojobs.aiohttp import atomic

@atomic async def handler(request): return web.Response()

For more information read documentation: https://aiojobs.readthedocs.io

Communication channels

aio-libs google group: https://groups.google.com/forum/#!forum/aio-libs

Feel free to post your questions and ideas here.

Gitter Chat https://gitter.im/aio-libs/Lobby

We support Stack Overflow <https://stackoverflow.com>_. Please add python-asyncio or aiohttp tag to your question there.

Author and License

The aiojobs package is written by Andrew Svetlov.

It's Apache 2 licensed and freely available.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].