Tweet sentiment analysis from the command line, built in Python and implemented with Tweepy, Textblob, and Click.
This repository uses Python 3.5+. For now, also use virtualenv.
$ git clone {repo URL}
$ cd tweepy_sentiment_analysis
$ cp .env.example .env
$ python -m venv venv
$ source venv/bin/activate
<venv>$ pip install -r requirements.txt
You will need to Twitter API keys and access tokens for the environment variables in .env
.
These keys and tokens are generated in the Twitter Developer Portal.
Once installation is complete, using this tool is as simple as calling:
<venv>$ python src/main.py [COMMAND] [OPTIONAL FLAGS]
Reference the Click and Tweepy documentation as needed to grok advanced usage.
Use Pytest for testing and Black for formatting/styling code.
Run tests by calling:
<venv>$ pytest
N.B. Pytest configuration is in pytest.ini. Black configuration is in pyproject.toml.