Skip to main content

Async-related stuff you miss in standard library

Project description

Async-related stuff you miss in standard library

Fire-and-forget task

With create_task() it’s your responsibility to retrieve exception. Usually this causes that exception is not seen until process finishes or even is not seen at all if process is killed. With launch_watched() excpetion is logged immediately when it’s raised.

async_plus.launch_watched(your_coroutine_func(...))

Structuring groups of tasks

async with async_plus.task_scope() as scope:
    scope.launch(coroutine_func1(...))
    scope.launch(coroutine_func2(...))
    await scope.wait()

By default, wait() call returns when all tasks finish or first exception occurs. In all cases all unfinished tasks are cancelled at the end of async with block.

Change log

See CHANGELOG.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

async_plus-0.1.0.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

async_plus-0.1.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file async_plus-0.1.0.tar.gz.

File metadata

  • Download URL: async_plus-0.1.0.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3

File hashes

Hashes for async_plus-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ebaef1b19cad33ae620a8e358a770c8784c8ca5f021002d6d8e74f70ac403365
MD5 c5af30a0a3db1d422a4d751736f505d5
BLAKE2b-256 8c063f9590eb40060108ec49e017349fdfbb938ebf5a41190c534a3dad36ff1a

See more details on using hashes here.

File details

Details for the file async_plus-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: async_plus-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3

File hashes

Hashes for async_plus-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c93c809345f765ac99c0faa1380b3e3dd244ec857bac5ac1addbc71d2d6b92d8
MD5 f9981a5ae34cc36dac3c060a5e9f0442
BLAKE2b-256 acd135322b2beb346327db5175f0e0c93b59d88aa5f3c8f9ef63d1d31d4c6442

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page