scistag.webstag.web_helper.WebHelper¶
- class WebHelper[source]¶
Bases:
objectHelper function for resolving host ips and then own IP
Methods
Returns the server's public IP as seen by other servers by using the IP resolving service defined.
Attributes
__dict____doc____module____weakref__list of weak references to the object (if defined)
- static get_public_ip(timeout_s=5.0, max_cache_age=86400.0)[source]¶
Returns the server’s public IP as seen by other servers by using the IP resolving service defined. (at the moment limited to ipify).
- Parameters
timeout_s – The maximum response timeout in seconds
max_cache_age – The time in seconds for how long the result shall be cached.
- Return type
str | None
- Returns
The IP