The page you navigated to () does not exist, so we brought you to the closest page to it.
You have switched from the to the variant of this site. There is no equivalent of . We have taken you to the closest page in the variant.
2.1.9
Syncify
Package: flyte.syncify
A decorator to convert asynchronous functions or methods into synchronous ones.
This is useful for integrating async code into synchronous contexts.
syncer = Syncify()
@syncer
async def async_function(x: str) -> str:
return f"Hello, Async World {x}!"
# now you can call it synchronously
result = async_function("Async World")
print(result)
# Output: Hello, Async World Async World!
# or call it asynchronously
async def main():
result = await async_function.aio("World")
print(result)Parameters
class Syncify(
name: str,
)| Parameter | Type | Description |
|---|---|---|
name |
str |