Package for generating randomized tweets of a user on twitter.
Project description
Tweet Generator
The drump tweet generator uses a Markov chain finite state model to take a particular user id from twitter and generate tweets based off of that person’s previous tweets. The tweets are stored in a JSON document which allows for random walks of the tweets to occur.
Goals
Simplify creating a basic Markov Chain Twitter Bot.
Easy to read and provide an introduction to a simple way to create something intelligent!
Features
Option to remove urls.
Option for proper capitalization
Output of the generated tree into a pretty JSON Format that you can review.
Scraping of the Twitter API using the Tweepy Library
Installation
To install, use pip
pip install tweet-generator
Example
See the following example:
from tweet_generator import tweet_generator TPCK = '<public_consumer_key>' TSCK = '<secret_consumer_key>' TPAK = '<public_access_key>' TSAK = '<secret_access_key>' twitter_bot = tweet_generator.PersonTweeter('25073877',TPCK,TSCK,TPAK,TSAK) random_tweet = twitter_bot.generate_random_tweet() print(random_tweet)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for tweet_generator-0.0.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e515ded962b09f87c13e1f7131a0a485fb40de64d457832f06aac120a20d07fb |
|
MD5 | 8a46afc516ef90e9b6d6b5fd515dfc60 |
|
BLAKE2b-256 | d2faa5ed47cb47896be84e1310aee33d74d296d658f0f5ff21d369918125e435 |