Integration · Python

Blocking or asyncio.Fully typed.

The kaabist package covers the whole API for Python 3.11 and later, with typed models, pages that fetch as you iterate, and a wait that can answer a job's questions as it goes.

sdk · setup
pip install kaabist

How it works

  1. 01

    Run and wait

    Create a job, then wait for it. on_input supplies a value the job asked for; on_attention decides what happens when it needs attention.

    example
    from kaabist import Kaab
    
    with Kaab() as kaab:  # KAAB_API_KEY
        job = kaab.jobs.create(program="renew-subscription@production",
                               inputs={"account": "A-1042"})
        done = kaab.jobs.wait(
            job.id,
            on_input=lambda request, job: ask_for_code(request.prompt),
        )
  2. 02

    Async, the same way

    AsyncKaab has the same methods for asyncio code, and lists iterate across pages as you go.

    example
    from kaabist import AsyncKaab
    
    async with AsyncKaab() as kaab:
        async for proposal in kaab.proposals.list(status="pending"):
            print(proposal.id)

Other integrations

Connect it once.Keep it running.

Opening soon

Kaabist is getting ready for launch. The panel, the docs and the status page open on launch day.