If I understood correctly, you only need this function that communicates with the server not to block the rest of the code? If so, using aiohttp
(async requests) will solve this.
BYW asyncio is meant to replace multithreading, as it allows running io-bound tasks without blocking the system, which is exactly what you need.