Tweetfeels

Latest version: v0.4.1

Safety actively analyzes 688746 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.4.1

* Fix compatibility with Python 3.7
* Updated pandas function call to remove the deprecation warning.

0.4.0

**Added**
* Improved interface for ``TweetData.fetchbin``.
* A new parameter ``empty`` allows you to enable returning empty bins.
* The return type is now a ``TweetBin`` instead of a tuple.
* Improved interface for ``TweetFeels.sentiments`` generator.
* A new parameter ``nans`` allows you to enable a nan sentiment value to be returned when data is missing.
* The return type is a ``Sentiment`` object.

0.3.1

* Adds the missing interface for parameterizing the real-time sentiment.

0.3.0

* Adds a generator to tweetfeels to generate sentiment values in series
* Allows user to change the bin size for the real-time sentiment calculations.

0.2.1

0.2.0

The following features were added:
- Additional `pos`, `neu`, and `neg` dimensions added to tweet data
- Datetime is now stored in data as a datetime object rather than string
- Tweetfeels will now attempt to reconnect to twitter when the connection is interrupted
- Improved data handling for stream data.

This release changes the format of the sqlite3 database which keeps the history of all tweets. As a result, you will need to convert any databases that were created with the 0.1 version. This can be done like so:

python
from tweetfeels import TweetData, Tweet
import time

def to_dict(row):
ts = time.strftime('%a %b %d %H:%M:%S +0000 %Y', row.created_at.to_pydatetime().timetuple())
return {
'id_str': row.id_str, 'created_at':ts, 'text':row.text,
'favorite_count':str(row.favorite_count), 'favorited':str(row.favorited),
'lang':'en', 'retweet_count':str(row.retweet_count), 'source':row.source,
'user':{'friends_count':str(row.friends_count), 'followers_count':str(row.followers_count),
'location':row.location}
}

if __name__ == "__main__":
old_db = TweetData('feels-0.1.sqlite')
new_db = TweetData('feels-0.2.sqlite')

for df in old_db.all:
for row in df.itertuples():
t = Tweet(to_dict(row))
new_db.insert_tweet(t)


Update the filenames for the `old_db` and `new_db` accordingly.

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.