pif Package
base Module
-
class pif.base.BasePublicIPChecker[source]
Bases: object
Base public IP checker.
-
get_local_ip()[source]
Gets local IP
-
get_public_ip()[source]
Get public IP.
-
uid = None
discover Module
-
pif.discover.autodiscover()[source]
Autodiscovers the pif IP checkers in checkers directory.
exceptions Module
-
exception pif.exceptions.InvalidRegistryItemType[source]
Bases: exceptions.ValueError
Raised when an attempt is made to register an item in the registry which does not have a proper type.
helpers Module
-
pif.helpers.PROJECT_DIR(base)
utils Module
-
pif.utils.ensure_autodiscover()[source]
Ensures the IP checkers are discovered.
-
pif.utils.list_checkers()[source]
Lists available checkers.
-
pif.utils.get_public_ip(preferred_checker=None, print_info=False)[source]
Gets IP using one of the services.
Parameters: |
- preffered checker (str) – Checker UID. If given, the preferred checker is used.
- print_info (bool) – If set to True, debug info is printed.
|
Return str: | |