Skip to content

HelloChatterbox/ask-the-duck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ask the Duck

python library to interact with DuckDuckGo API

  • natural language queries
  • language support via automatic translation
  • infobox parsing

Install

pip install ask-the-duck

Usage

from ask_the_duck import DDG

# ddg api
ddg = DDG()
print(ddg.get_infobox("stephen hawking"))
print(ddg.search("light speed"))

# natural language api
print(ddg.ask_the_duck("tell me about Isaac Newton"))

# language support
ddg = DDG("pt")
print(ddg.ask_the_duck("elon musk"))