Skip to main content

Library for querying the Duck Duck Go API

Project description

A Python library for querying the Duck Duck Go API.

Copyright Michael Stephens <me@mikej.st>, released under a BSD-style license.

Source: http://github.com/mikejs/python-duckduckgo

Installation

To install run

python setup.py install

Usage

>>> import duckduckgo
>>> r = duckduckgo.query('Duck Duck Go')
>>> r.type
'answer'
>>> r.results[0].text
'Official site'
>>> r.results[0].url
'http://duckduckgo.com/'
>>> r.abstract.url
'http://en.wikipedia.org/wiki/Duck_Duck_Go'
>>> r.abstract.source
'Wikipedia'
>>> r = duckduckgo.query('Python')
>>> r.type
'disambiguation'
>>> r.related[6].text
'Python (programming language), a computer programming language'
>>> r.related[6].url
'http://duckduckgo.com/Python_(programming_language)'
>>> r = duckduckgo.query('1 + 1')
>>> r.type
'nothing'
>>> r.answer.text
'1 + 1 = 2'
>>> r.answer.type
'calc'

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

duckduckgo-0.1.tar.gz (2.9 kB view details)

Uploaded Source

File details

Details for the file duckduckgo-0.1.tar.gz.

File metadata

  • Download URL: duckduckgo-0.1.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for duckduckgo-0.1.tar.gz
Algorithm Hash digest
SHA256 4a07ad344014da3b269e9fc449d71b0b471a9fcd1851744fea0c64d758a21ca4
MD5 abdfbff33454f4834800eb04fa1cf923
BLAKE2b-256 ce781e526aa58258db84b1f4a0493438f90aeddc9f42eb96be930c0fd67f7fcb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page