Use connection pools for better performance. Replace M2Crypto with cryptography and urllib3's ssl context.