Amazing-Python-Scripts

Форк
0

README.md

Package/Script Name

  • requests library is used, to make HTTP requests in Python
  • quote.py script is used to generate random quotes by fetching them from public API endpoint

Setup instructions

  • Install python from here
  • Install requests library using command : pip install requests

Detailed explanation of script, if needed

The function generate_quote() make GET request to the public API endpoint, extracts the data in json format and displays in randomly to the user. It handles error if any in the else condition.

Output

Output

In text Format the output would be as follows :
Arnold Schwarzenegger - If you want to turn a vision into reality, you have to give 100% and never stop believing in your dream.

Author(s)

Mahima Churi

Disclaimers, if any

Any puplic API can be used for generating quotes, also datasets from Kaggle can also be imported and used.

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.