Block them.
I suggest looking into blocking malicious ASNs since you will (soon) realize that the attacks often come from the same conflictive networks.
Yes, I have quite a few small ASNs covered. But many of these Python hits are coming from Amazon and Microsoft servers. So I can’t block by ASN, only by a user agent.
Honestly, because these cloud providers have a free trial, attackers abuse that a lot. By blocking those ASNs, you won’t block legitimate bots if you allow them.