Library for querying the Duck Duck Go API, updated for python3
Project description
ddg3
A Python library for querying the Duck Duck Go API.
Copyright Michael Stephens me@mikej.st, released under a BSD-style license.
Updated for Python3 by Jacobi Petrucciani jacobi@mimirhq.com
Source: https://github.com/jpetrucciani/python-duckduckgo
Installation
To install run
pip install ddg3
or
python setup.py install
Usage
import ddg3
r = ddg3.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 = ddg3.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 = ddg3.query('1 + 1')
r.type # 'nothing'
r.answer.text # '1 + 1 = 2'
r.answer.type # 'calc'
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ddg3-0.6.8.tar.gz
(5.0 kB
view details)
Built Distribution
ddg3-0.6.8-py3-none-any.whl
(4.9 kB
view details)
File details
Details for the file ddg3-0.6.8.tar.gz
.
File metadata
- Download URL: ddg3-0.6.8.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a91ecec252296cbe0e37d9366b0b4ad2d89d0b425d56efa0e1f1c583aa6e4dd |
|
MD5 | caa9206dbd71607d3d95c8fb71311154 |
|
BLAKE2b-256 | b6abc3eba78bc73477a5ca85aaf6d4999f0960437069d43a14ab4121eb633af3 |
File details
Details for the file ddg3-0.6.8-py3-none-any.whl
.
File metadata
- Download URL: ddg3-0.6.8-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f152fa0d7903506e16cf9cfe5b5f092244af520a4b55cab49d365f8109cc9d09 |
|
MD5 | ea457e2873309724f71ed7bf62585022 |
|
BLAKE2b-256 | e3cffbdb53b36891ddb6669ccbf17e8c26e82eefb9726e5a0ed23dbb50b6449c |