There is no Werkzeug (using the WSKI Toolkit Flask tool), which returns only the host name. What you can do is use the urlparse Python module to get the host name from the result Werkzeug gives you:
from urlparse import urlparse o = urlparse("http://127.0.0.1:5000/") print o.hostname
source share