Using existing Python scripts

I have multiple existing python scripts that I want to use in Home Assistant. I am aware that I have to modify them (coming from Indigo Domotics).

Some simply calculate a variable and should be called every minute.

Other scripts are automations of devices that have specific timing and need to calculate things based on variables and states of devices.

Is Pyscript the right way to do this?

Are there variables in HA available, for example timestamps of trigger events or “virtual states (strings)”.
For example if a group of sensors trigger they should make a new timestamp which is accessible from python.