Skip to content

nathanielcompton/python-twitter-sentiment-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twitter Sentiment Analysis

PyPI - Python Version MIT license Code Style

Tweet sentiment analysis from the command line, built in Python and implemented with Tweepy, Textblob, and Click.

Installation

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.

Usage

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.

Development and Testing

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.

About

Tweet sentiment analysis from the command line

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published