Wrap your asynchronous functions so they behave like synchronous function.
Project description
This package is meant for wrapping asynchronous functions so that they behave like synchronous functions. This package is very useful when scripting.
Getting Started
pip install syncify
Usage
Suppose you have an asynchronous function called asyncFunction that has a keyword arguement, 'callback' for the callback function. You can run it synchronously like this:
from syncify import syncify results syncify(asyncFunction, kw='callback')(arguments)
They keyword, kw is set to 'callback' by default so that can be left off, but I left it there in case someone has a different callback keyword.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
syncify-0.1.tar.gz
(1.8 kB
view details)
File details
Details for the file syncify-0.1.tar.gz
.
File metadata
- Download URL: syncify-0.1.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f5a6f00272ef7c8f39abec2ca7719aa68eaedd6caac7c7b91b8cdcb362a5249 |
|
MD5 | c4a86c6fab5574c144fbf3dfa33e91a7 |
|
BLAKE2b-256 | 3a5f335fc2be0f6e7e81486673d9086aaa98759864566e01a7db4a7c82bcc3cd |