Skip to content

A lightweight library for allowing async functions to be called in a synchronous manner.

License

Notifications You must be signed in to change notification settings

rmorshea/anysync

Repository files navigation

AnySync

PyPI - Version License: MIT

A lightweight library for allowing async functions to be called in a synchronous manner.

import asyncio
from anysync import anysync


@anysync
async def f():
    return 42


assert f().run() == 42


async def main():
    assert await f() == 42


asyncio.run(main())

Just pip install anysync and you're good to go!

Documentation

For more information, please see the documentation.

About

A lightweight library for allowing async functions to be called in a synchronous manner.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages