It would be better if the code is able to handle failed requests, timeouts, or network-related issues using try - except. This is because there can be possiblity that the API does not response and timesout thus handling that would ensure that the code does not break.
https://github.com/JacksonQu/Software-Supply-Chain-Security-Assignment1/blob/d446488fdbda84f8264478efa141aa9ba9dba792/main.py#L8C1-L17C9
It would be better if the code is able to handle failed requests, timeouts, or network-related issues using try - except. This is because there can be possiblity that the API does not response and timesout thus handling that would ensure that the code does not break.