Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 854 Bytes

USAGE.md

File metadata and controls

40 lines (29 loc) · 854 Bytes
# Synchronous Example
from clerk_backend_api import Clerk

with Clerk(
    bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as clerk:

    res = clerk.email_addresses.get(email_address_id="email_address_id_example")

    assert res is not None

    # Handle response
    print(res)

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

# Asynchronous Example
import asyncio
from clerk_backend_api import Clerk

async def main():
    async with Clerk(
        bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
    ) as clerk:

        res = await clerk.email_addresses.get_async(email_address_id="email_address_id_example")

        assert res is not None

        # Handle response
        print(res)

asyncio.run(main())