- Version 0.3 (October 2015)
- Author: Henry Cooke, [email protected]
botkit
is a toolkit for the creation of Twitter bots, written in Python. It is intended to take care of the tricky and annoying stuff (like obtaining OAuth tokens and scheduling tweets) so you can get on with writing the interesting bits.
botkit
is configured with a few environment variables:
TWITTER_CONSUMER_KEY
: a Twitter app keyTWITTER_CONSUMER_SECRET
: a Twitter app key secret
TWEET_INTERVAL
: time between tweets, in seconds. Defaults to 3 hours (10,800).OAUTH_ENABLED
: if True (or yes, or 1), botkit will run a web interface for obtaining oauth keys.BOTKIT_ROOT
: path to a directory in which to store persistent configuration files. Defaults to~/botkit
LAST_MENTION_ID
: Used when starting up; for bots which reply to things, only tweets newer than this id will be replied to.
Two sample bot projects are available that use botkit
:
- asciibot, which tweets random lines from textfiles.com.
- burningraving, which tweets lines from Dylan Thomas's poem Do not go gentle into that good night.
- More flexible tweet timing options,
- More extensive documentation & comments.