An open API service indexing awesome lists of open source software.

https://github.com/mattmajestic/streamlit-news

πŸš€ News API for Streamlit
https://github.com/mattmajestic/streamlit-news

news-api streamlit

Last synced: 7 months ago
JSON representation

πŸš€ News API for Streamlit

Awesome Lists containing this project

README

          

# πŸ“° Streamlit News

Welcome to the **Streamlit News App**, a simple and fun way to display the latest news using Python and Streamlit! This project is perfect for those getting started with Python and web development using the awesome **Streamlit** framework.

## πŸš€ Features
- Fetch the latest news from the **News API**.
- Choose from different categories like `technology`, `sports`, `business`, `entertainment`, `politics`, and `health`.
- Securely enter your API key using the sidebar.
- Clean and interactive UI built with **Streamlit**.

## πŸ› οΈ Getting Started

### πŸ“‹ Prerequisites
- **Python 3.7+** installed. Download it from [here](https://www.python.org/downloads/).
- Basic understanding of Python.
- A **News API** key. Sign up and get one for free from [News API](https://newsapi.org/register).

### πŸŽ‰ Usage
1) Enter your News API key in the sidebar.
2) Choose a category from the dropdown.
3) Click to fetch the latest news in that category.

### πŸ§‘β€πŸ’» Code Breakdown
Here’s a simplified view of how the code works:

1) Set up Streamlit with a title, favicon, and a sidebar for inputs like the API key and category.
2) Make a request to the News API based on the selected category.
3) Display the news dynamically on the page with formatted titles and descriptions.