This is very simple package that fetches service name by its port and vice versa.
Service/Port data from IANA.
pip install portinfo
$ portinfo [Service Port | Service Name]
$ portinfo 5432
Output:
postgresql (PostgreSQL Database) :5432 tcp
postgresql (PostgreSQL Database) :5432 udp
$ portinfo redis
output:
redis (An advanced key-value cache and store) :6379 tcp