Skip to main content

A basic command line application used in tandem with Twitter API to frame anything from Twitter into a Pandas DataFrame, or exported as a CSV.

Project description

twitterframe

🥚🔜🐦 twiterframe. A basic command line application used in tandem with Twitter API to frame content from Twitter into your preferred format.

In the future, I want to add more flexibility with the preferred output. (i.e. JSON, SQL databases, etc.)

Project Currently: ON HOLD

Tweepy does not currently have the values from Twitter's API that I would like to use for the purpose of this project.

For example, if you click on the link for tweepy, it should bring you to Line 73 of the tweepy/models.py script, where the class Status(Model): and @classmethod is located. The Status object (which is just a Tweet object) from Twitter's API should give you a set of attributes like the following from the Twitter Developer documentation.

Unforunately, if we refer back to tweepy, inside of the parse function, we can see that the key,value pairings do not provide as many Tweet object attributes as one may like to have. (That one being me.) And so what I am going to be working on in the mean time is a pull request to @tweepy, and add the attributes I want to see from Twitter's API.

Hopefully all goes well and i'll be able to use tweepy once again, and finish up this command-line-application, but in the mean time, please use my pre-alpha version from the Installation.

Installation and Usage:

  • Coming soon.

Progress so far...

✅ Users are able to create .json files to store their API keys.

✅ Added click functionality.

✅ Functional Command Line Application by invoking twitterframe

✅ Added a command that removes your Twitter API credentials file from your home directory.

scrape command is now functioning as it should be.

✅ Opened up project on pypi.org so it can be 'pip-install-able' here

🔜 Make some basic documentation on installation/usage.

🔜 crawl command will require a mandatory argument for how many tweets to get per request, and the rate limit for the TwitterAPI is reached, an exception is passed.

🔜 Add functionality for a StreamListener class that will listen for live tweets and bin based on sentiment.

🔜 Decorate the command line application with more colors

Ideas on new features and commands

💡 Command that dumps tweets into a SQL database.

💡 Add more emojis.

💡 Add click.progress_bar(s) on commands like scrape and crawl to show progress.

💡 Remove some of the comments because the code looks kinda ugly.

💡 A way to parse images in tweets/replies/retweets. Dump into a JSON or CSV.

💡 Add options/configurations to determine the output for exporting tweets from scrape, crawl, etc.

💡 Create options for the output for each given command. (i.e. scrape would have the option to dump the tweets from user: @twitteruser, to either a CSV, an SQL database, etc.) (etc. is used quite liberally in my explanations of things in this README.)

Known issues

❗️ crawl command is not pulling tweets by the specified times.

❗️ crawl gets a Twitter error response: status code = 429 due to the application's rate limit on the amount of requests to be served.

❗️ listener does not do anything. Yeah I know, big issue here.

❗️ Some exceptions are not working apprropriately.

❗️ Honestly there are so many known issues at this point LOL

❗️ tweepy does not have enough attributes in the class methods to my liking.

❗️ Going to learn some more object oriented programming and classmethod related stuff, so that I can either A) build a new tweepy or B) add more funcitonality to the next version of tweepy.

❗️ Streaming does not work.

❗️ RateLimitError is not being raised even if intentional.

Contributors with 💚

🏆 @colejhudson

Contact

📬 christopher.a.louie@gmail.com

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

twitterframe-1.0.0.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

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

twitterframe-1.0.0-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

Details for the file twitterframe-1.0.0.tar.gz.

File metadata

  • Download URL: twitterframe-1.0.0.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for twitterframe-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c8a26511b689e5ab535f44a3be12309b1cad2d85c323f62eec456b6f3f3ce677
MD5 718a25a60d9f35607268ce03f0d32974
BLAKE2b-256 1e64aa40189c26a9762fb1cb645dda18b3cd835461ad98a88a909a7a422676d7

See more details on using hashes here.

File details

Details for the file twitterframe-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: twitterframe-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 24.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for twitterframe-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a3ebe3dd721501e7958407e4766abad9af7c7ef513012eec3014b4a91f12ff24
MD5 b968670723d0459d7536af2cb1d8b68e
BLAKE2b-256 bfe911a2b3c195289c589e11d771b19fa537728593c8374833155a459857e575

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