Skip to content

pyquack#

A simple Python sync/async duckduckgo API wrapper.

Installation#

By default, pyquack will be synchronous and will use the requests libary.

pip install -U pyquack

For async support,

pip install -U pyquack[async]

Quickstart#

Synchronous#

import pyquack

client = pyquack.Client()

response = client.query("DuckDuckGo")

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

For all of the available attributes on the response object, refer Models

Asynchronous#

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())

Contact#

Feel free to raise issues or contribute on GitHub

Contact me on Discord: anand#8837