https://github.com/foxfix/flask_twitter_app
https://github.com/foxfix/flask_twitter_app
flask python3 sentiment-analysis twitter-api
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/foxfix/flask_twitter_app
- Owner: Foxfix
- Created: 2017-07-14T13:49:04.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2025-11-21T19:36:25.000Z (7 months ago)
- Last Synced: 2025-11-21T21:17:26.090Z (7 months ago)
- Topics: flask, python3, sentiment-analysis, twitter-api
- Language: Python
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Flask Twitter App 🐦
[](https://www.python.org/)
[](https://flask.palletsprojects.com/)
[](LICENSE)
A simple Flask application that integrates with the Twitter API, retrieves tweets, performs sentiment analysis, and visualizes them.
---
## Features ✨
- Log in with Twitter using OAuth
- Retrieve latest tweets based on search queries
- Perform sentiment analysis on tweets
- Color-coded tweets by sentiment
- PostgreSQL database for user and tweet management
- Simple web interface using Flask
---
## Installation ⚡
Clone the repository:
```bash
git clone https://github.com/Foxfix/Flask_Twitter_app.git
cd Flask_Twitter_app
```
Create and activate a virtual environment:
```
python -m venv venv
source venv/bin/activate # Linux/Mac
venv\Scripts\activate # Windows
```
Install dependencies:
```pip install -r requirements.txt```
## Configuration 🛠️
1. Создай Twitter developer account и получи **consumer keys**.
2. Создай PostgreSQL базу и таблицу:
```sql
CREATE TABLE users(
id SERIAL PRIMARY KEY,
screen_name text,
oauth_token text,
oauth_token_secret text
);
```
Update your app.py with database credentials:
```
Database.initialise(database='your_db', host='localhost', user='your_user', password='your_password')
```
Usage 🚀
Run the Flask app:
```python app.py```
Open your browser at http://127.0.0.1:4995
Technologies 🛠️
Python 3.10+
Flask
PostgreSQL
Twitter API
Sentiment Analysis API
License 📄
This project is licensed under the MIT License.