3 ms·
My personal favorite is native support for IP addresses, introduced in python 3.3[0]. Makes IP math and address validation so much easier. [0] https://docs.pyt
by signet 9y ago
My personal favorite is native support for IP addresses, introduced in python 3.3[0]. Makes IP math and address validation so much easier.
[0] https://docs.python.org/3/library/ipaddress.html https://docs.python.org/3/library/ipaddress.html
- bpicolo 9y agoTo be fair, you can grab the original. https://pypi.python.org/pypi/ipaddress https://pypi.python.org/pypi/ipaddress
- jsmthrowaway 9y agoAnybody who likes that will like subnettree, too, which offers a C-based Patricia tree for IP addresses. In the past, I've gotten a lot of mileage out of this library: https://pypi.python.org/pypi/pysubnettree https://pypi.python.org/pypi/pysubnettree Last time I played with it, it didn't like Python 3 or ipaddress, though. I see a recent upload, so maybe they addressed that.
- est 9y ago> address validation just try: socket.inet_aton
- pwdisswordfish 9y agoThat doesn't seem to support IPv6 at all. And doesn't let you do much with a parsed address either.