I didn't think that metronome itself is a problem, but the accuracy could be an issue

Currently I'm looking for the solution how to send the tempo over socket.io to t-watch.
I have two messages in mind:
1. Start Metronome with specific tempo value
2. Stop Metronome
By the way guys, could anyone please give me a link to some kind of best practice how to upload a project with multiple Python files into ESP32 ? I've spent couple of nights by now and all I found were basic examples only.
Cheers,
Vlad