Skip to content

anand2312/pyquack

Repository files navigation

pyquack

Code style: black

Simple Python sync/async duckduckgo API wrapper.

Documentation

Quickstart

Synchronous:

import pyquack

client = pyquack.Client()

response = client.query("DuckDuckGo")

print(response.results)
print(response.definition)

Async:

import asyncio

import pyquack

async def main() -> None:
    client = pyquack.AsyncClient()

    response = await client.query("DuckDuckGo")

    print(response.results)
    print(response.definition)

asyncio.run(main())