---
title: Twitter bots using Tweepy
author: rhnvrm
type: post
date: 2016-01-29T00:00:00+00:00
url: blog/2016/01/29/twitter-bots-using-tweepy/
categories:
  - projects

---
Unable to think what to tweet about? Have you ever faced a similar situation?

<img src="https://naldzgraphics.net/wp-content/uploads/2009/04/twi1.jpg">

Well, it’s very easy to create your own bots using python’s Tweepy module. You can use these skeletons I recently made for a workshop on the same topic. All you need to make your own bot is add some logic to these skeletons.

* * *

This is a basic static script that you can use by running once yourself or setup a cronjob to run automaticall in intervals. Currently, it fetches JSON data from an API and parses it into a python dict which you can then manipulate with your py-fu.



* * *

This script uses twitter’s streaming API which you can use to read content in real time and act upon it again, in real time!



* * *

Note you will also need this file in the same directory, it holds your keys. You should add this file to <code class="highlighter-rouge">.gitignore</code> before commiting your keys in your own repo.



If you create your own bot using this, we would love for you to also add it to the [audience][2] folder in the repo by sending a pull request.

 [2]: https://github.com/ACM-SNU/api-bot-python/tree/master/audience