Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 768 Bytes

USAGE.md

File metadata and controls

41 lines (29 loc) · 768 Bytes
# Synchronous Example
import os
from permitstack import Permitstack


with Permitstack(
    api_key=os.getenv("PERMITSTACK_API_KEY", ""),
) as p_client:

    res = p_client.health.health_check()

    # Handle response
    print(res)

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

# Asynchronous Example
import asyncio
import os
from permitstack import Permitstack

async def main():

    async with Permitstack(
        api_key=os.getenv("PERMITSTACK_API_KEY", ""),
    ) as p_client:

        res = await p_client.health.health_check_async()

        # Handle response
        print(res)

asyncio.run(main())