If your code is written in Python, what’s to stop users from just rewriting the license check?
In my youth I realised that a licensed package was calling a separate executable to check the license - the return code determined if the product was licensed. I replaced the license code with a shell script that returned '1' and it all worked. Simple, naive days.
P.