ddg3-0.6.8
توضیحات
Library for querying the Duck Duck Go API, updated for python3
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | ddg3-0.6.8 |
| نام | ddg3 |
| نسخه کتابخانه | 0.6.8 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Michael Stephens, Jacobi Petrucciani |
| ایمیل نویسنده | jacobi@mimirhq.com |
| آدرس صفحه اصلی | https://github.com/jpetrucciani/python-duckduckgo |
| آدرس اینترنتی | https://pypi.org/project/ddg3/ |
| مجوز | BSD |
[](https://badge.fury.io/py/ddg3)
[](https://github.com/ambv/black)
[](https://www.python.org/downloads/release/python-360/)
# 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
```python
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'
```
نیازمندی
| مقدار | نام |
|---|---|
| - | requests |
نحوه نصب
نصب پکیج whl ddg3-0.6.8:
pip install ddg3-0.6.8.whl
نصب پکیج tar.gz ddg3-0.6.8:
pip install ddg3-0.6.8.tar.gz