Python application that always requests a specific port number

I want to create a python application that always listens on a parameterized port. Whenever there is a request coming from the port, the application will analyze the request and perform tasks based on the request.

Is this type of application called a service? (I have 0 knowledge about services). Where can I find beginner tips and tricks for this type of development?

+4
source share
3 answers

This is called server , there are examples at the bottom of the Python socket .

NTN.

+3
source

This is socket programming . Writing sockets is cumbersome, you can use any web server written in python. My recommendation is to use werkzeug , it is very simple. Meanwhile, check out Flask , which is built on top of werkzeug.

If you are trying to create your own twisted protocol engine, this will help you achieve this.

+3
source

You can use streams or Twisted (possibly a simpler option) to create a server.

+1
source

Source: https://habr.com/ru/post/1396757/


All Articles