search

Home  >  Q&A  >  body text

Python equivalent of the "INET6_ATON" SQL function

I want to convert a PHP program using MySQL to Python. I found a way to store the database, but I need to find Pythonic replacements for the INET6_ATON SQL functions. Can anyone help me?

P粉030479054P粉030479054476 days ago473

reply all(1)I'll reply

  • P粉595605759

    P粉5956057592023-09-07 10:15:45

    [From Alvin Roth]

    Thanks it does the exact same thing!

    Documentation for ipaddress.IPv4Address.packed: https://docs.python.org/3/library/ ipaddress.html#ipaddress.IPv4Address.packed

    reply
    0
  • Cancelreply