Skip to content

Latest commit

 

History

History
38 lines (31 loc) · 812 Bytes

File metadata and controls

38 lines (31 loc) · 812 Bytes
# Synchronous Example
from orq_poc_python_multi_env_version import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY", ""),
) as s:
    res = s.contacts.create(external_id="<id>")

    if res is not None:
        # handle response
        pass

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

# Asynchronous Example
import asyncio
from orq_poc_python_multi_env_version import Orq
import os

async def main():
    async with Orq(
        api_key=os.getenv("ORQ_API_KEY", ""),
    ) as s:
        res = await s.contacts.create_async(external_id="<id>")

        if res is not None:
            # handle response
            pass

asyncio.run(main())