# fetch_data.py
import requests

def fetch_data():
    url = "https://polisplexity.tech/api/data/polisplexity_products"
    try:
        response = requests.get(url)
        response.raise_for_status()  # This will raise an exception for HTTP errors
        return response.json()  # Parse and return JSON data
    except requests.exceptions.RequestException as e:
        print(f"Request failed: {e}")
        return None


