Skip to content
This repository was archived by the owner on Sep 12, 2025. It is now read-only.

Latest commit

 

History

History
42 lines (29 loc) · 750 Bytes

File metadata and controls

42 lines (29 loc) · 750 Bytes
# Synchronous Example
from unkey_py import Unkey


with Unkey(
    bearer_auth="UNKEY_ROOT_KEY",
) as unkey:

    res = unkey.liveness.check()

    assert res.object is not None

    # Handle response
    print(res.object)

The same SDK client can also be used to make asychronous requests by importing asyncio.

# Asynchronous Example
import asyncio
from unkey_py import Unkey

async def main():

    async with Unkey(
        bearer_auth="UNKEY_ROOT_KEY",
    ) as unkey:

        res = await unkey.liveness.check_async()

        assert res.object is not None

        # Handle response
        print(res.object)

asyncio.run(main())