API call from pyscript, display energydata in interface

Hi Everyone,
Just started my automation journey. I would like to make an API call from pyscript. Got HACS and pyscript installed and would like to once a day get the energy prices and display them on my interface. Where in general is data stored when using pyscript in HA? Is a database required? I would like to run this code and display it in my dashboard

import requests
request = 'https://platform.allinpower.nl/api/public/dam/day_ahead_prices/?first_datetime=2022-08-02T22:00:00.000Z'
response = requests.get(request)
print(response.json())

Later on in my project i would like to use them to automate a battery. Am i using the right approach to start here with the data? How do you go about installing libraries from python? Any help would be greatly appreciated!

Greetings Tom

Hi, were you able to get this working? I have a similar setup running a py in HACS pyscript but unsure how to call the service and get the response available in HA.