Skip to main content

Simple async module based on threading.

Project description

Asyncro Library

What is this?

Simple async module based on threading

Quick Guide

The module provides you an easy way to create an async function without using default methods:

@asyncro.asynchronous
def some_function(arr):
    time.sleep(1)

    for element in arr:
        print(element)
        time.sleep(0.1)

some_function(['hello', 'easy', 'async', 'module'])

>>>

hello
easy
async
module

Just use the decorator.


Using

Using the library is as simple and convenient as possible:

Let's import it first: First, import everything from the library (use the import asyncro construct).

The wait function is used to wait until an asynchronous function completes and returns its result. It will block the current thread, or, if it is in an asynchronous function, pause it, waiting for the result.

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

asyncro-0.0.1.tar.gz (2.3 kB view hashes)

Uploaded Source

Built Distribution

asyncro-0.0.1-py3-none-any.whl (2.4 kB view hashes)

Uploaded Python 3

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