Skip to main content

A python package to analyse the tweets and extract meaning from the data, can be installed with pip.

Project description

Python Package for Twitter's Sentiment Analysis

version number: 0.0.2
author: Shekhar Jha


A python package to analyse the tweets and extract meaning from the data, can be installed with pip.


To install use pip:

$ pip install twittersent

Or clone the repo:

$ git clone
$ python install

Get the tokens/keys by registering at [Twitter Api]( and fill put the values of the following variables in `` file

consumer_key = None
consumer_secret = None
access_token_key = None
access_token_secret = None



A simple file that takes a list as an input

from client import TwitterSent

import sys
sys.path.insert(0, '/Users/xanthate/twittersent/twittersent')

print("Enter the list of keywords separated by commas: ")

user_input_as_string = input()
user_input_as_list = user_input_as_string.split(',') #splits the input string on commas

user_input_as_list = [a for a in user_input_as_list]

print("Enter the total number of tweets on which the analysis is to be done: ")
input_total_number_of_tweets = int(input())

T = TwitterSent()
value = TwitterSent.calculate_sentiment(T, user_input_as_list, input_total_number_of_tweets)
TwitterSent.barplot(T, value)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for twittersent, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size twittersent-0.0.2-py2.py3-none-any.whl (5.5 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size twittersent-0.0.2.tar.gz (3.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page