#Streamlit News App
This project is a simple and functional News Web App built using Streamlit and NewsAPI.org. It allows users to explore the latest news from various categories and countries in real time.
The main goal of this project is to provide a clean and interactive way to stay updated with current events using a simple and lightweight Python-based interface.
#Features
Fetches live news data using the NewsAPI.org service. Option to browse news by category such as business, sports, health, and technology. Displays article titles, descriptions, sources, and publication dates. Uses a .env file to securely store the API key. The .env file is included in .gitignore to protect sensitive information.
#Technologies Used
Python 3 Streamlit Requests Python Dotenv NewsAPI.org
#Installation and Setup
Follow these steps to run the project on your local system.
-
Clone the Repository git clone https://github.com/saimtec/news-app.git cd news-app
-
Create a Virtual Environment python -m venv venv
Activate the environment: For Windows:
venv\Scripts\activate
For macOS/Linux:
source venv/bin/activate
-
Install Required Packages pip install -r requirements.txt
-
Add the API Key
Create a file named .env in the project folder and add your NewsAPI key like this:
NEWS_API_KEY=your_api_key_here
Make sure .env is listed in .gitignore so it doesn’t get uploaded to GitHub.