Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 774 Bytes

File metadata and controls

41 lines (29 loc) · 774 Bytes
# Synchronous Example
from latitudesh_python_sdk import Latitudesh
import os


with Latitudesh(
    bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:

    res = latitudesh.api_keys.list()

    # Handle response
    print(res)

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

# Asynchronous Example
import asyncio
from latitudesh_python_sdk import Latitudesh
import os

async def main():

    async with Latitudesh(
        bearer=os.getenv("LATITUDESH_BEARER", ""),
    ) as latitudesh:

        res = await latitudesh.api_keys.list_async()

        # Handle response
        print(res)

asyncio.run(main())