Does something similar exist for python or node.js ?
If not I would like to contribute to that as an open source.
I made something similar, but with a JavaScript-first approach:
https://github.com/faisalman/ua-parser-js
https://github.com/matomo-org/device-detector
List of ports