Skip to main content

Package for generating randomized tweets of a user on twitter.

Project description

Tweet Generator

The 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

tweet-generator-0.0.31.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tweet_generator-0.0.31-py2.py3-none-any.whl (5.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file tweet-generator-0.0.31.tar.gz.

File metadata

File hashes

Hashes for tweet-generator-0.0.31.tar.gz
Algorithm Hash digest
SHA256 654c3a6de36a731b27014270b13f874d7b483f1be99be7e05eb89d5edcffa12c
MD5 fad53cb2a8db49e18842520950644f71
BLAKE2b-256 9b654aa51871497e21135aefe1bbc1c8b6eb5f461690dd8051e6454a4bd8d9b7

See more details on using hashes here.

File details

Details for the file tweet_generator-0.0.31-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for tweet_generator-0.0.31-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 42224fed317c9f815693aeb2c1b3b86448d4562ac71c13088f65c093e3657744
MD5 a171f50d258c43b3a733ba29e39f3522
BLAKE2b-256 f28923e5f2baace60830d26e68551fa580dc531eb1f2763dd5beaf42a2e8723e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page