title: How to get the IP of the default interface with Sanic
body: <p>Is it possible to get the IP of the default interface with <a href="https://sanic.dev/" rel="nofollow noreferrer">Sanic</a>?</p>
  <p>Here is how I do it with Socket. The idea is to do the same thing with Sanic.</p>
  <pre class="lang-py prettyprint-override"><code>import socket
  hostname = socket.gethostname()
  IP_address = socket.gethostbyname(hostname)
  print(IP_address) # 192.168.1.239
  </code></pre>