In this article we will learn how to build a twitter bot that tweet coronavirus stats using Python and Tweepy.

Image for post
Image for post
Photo by Yucel Moran on Unsplash

Note from the editors: Towards Data Science is a Medium publication primarily based on the study of data science and machine learning. We are not health professionals or epidemiologists, and the opinions of this article should not be interpreted as professional advice. To learn more about the coronavirus pandemic, you can click here.

Twitter provides an API through which users can interact with the platform. Tweepy is a python library that provides a way to access twitter API conveniently. It is a high level wrapper for the underlying API.

If you want to go straight to the code, click here.

Installation

We will be using Python 3 for this project. …


using Flask for backend and Scrapy to crawl news

Image for post
Image for post
Photo by Tim Mossholder on Unsplash

If you want to see the live websites, visit this page. For live stats, visit this page. I am not going to iterate line by line about how to write the code, if you want it, check this Github repo. I have also added all the news collected in the past 3–4 days.

I wanted to keep track of the latest updates about the contagious Coronavirus outbreak. Scrolling through social media was one option but given the amount of fake news and clickbaits that circulates in social media these days, I prefer consuming news from reliable news portals. …


Learn how to use an API and build a simple application using Python and Flask

Image for post
Image for post
Photo by Jarosław Kwoczała on Unsplash

In this article, we will learn the basics of using a web API. We will use Python and Flask to create a simple backend that calls Openweathermap API and render the result in a web page.

If you want to skip the article and access code, head over to the GitHub repo.

Get API Key

Goto https://home.openweathermap.org/users/sign_up

About

Sagun Shrestha

I read a lot and write sometimes

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store