Metadata-Version: 2.1
Name: asynct
Version: 0.0.1
Summary: This package uses threading to create a simple future-like async interface for functions.
Project-URL: homepage, https://scipy.org/
Project-URL: documentation, https://docs.scipy.org/doc/scipy/
Project-URL: source, https://github.com/scipy/scipy
Project-URL: download, https://github.com/scipy/scipy/releases
Project-URL: tracker, https://github.com/scipy/scipy/issues
Author-email: Daniel FH <danifhpublic@gmail.com>
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.7
Description-Content-Type: text/markdown

# Asynct

## Table of Contents

[Overview](#overview)

[Usage](#usage)

## Overview

This package uses threading to create a simple future-like async interface for functions.

## Usage

To make a function async you can use the `make_asynct` decorator:

```python
@make_asynct # Now this function won't block the main thread when ran.
def func(): ...
```

You can then use the result of the function (which is an asynct object) - either asynchronously or synchronously:

```python
func_asynct = func()

@func_asynct.then
def does_something_with_the_result(result): ...

@does_something_with_the_result.then
def does_another_thing_with_the_result(result): ...

# or

result = func_asynct.await_it()
# ...
```
