DEV Community

Discussion on: Need help on implementing client-server communication in Python

Collapse
 
biskit1943 profile image
Maximilian Konter

Well, a bit more detail would be nice. How should the communication be done? Socket? HTTP ? Which Python version can you use? If you're on Python 3.7+ and want to use HTTP then I can really recommend fastapi wich ist super nice. Else I'm not having any experience yet or I don't know any frameworks.

Collapse
 
forfdev profile image
Andrew Spittlemeister

I second the fastapi if you are going to go with HTTP, it is both easy to use and opens up the possibility of using async if you are able to and are comfortable with it. If this isn't an HTTP type of project, I would suggest ZeroMQ for your protocol, it's not the easiest to learn in the beginning but it is certainly easier to work with than raw sockets in the long run (they even have a client-server example that you can expand on).

If you need a message broker (although it doesn't sound like you do), you could give RabbitMQ a look.