pif Package

base Module

class pif.base.BasePublicIPChecker[source]

Bases: object

Base public IP checker.

get_local_ip()[source]

Gets local IP

Return str:
get_public_ip()[source]

Get public IP.

Return str:
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.

Return list:
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:
Read the Docs v: 0.5
Versions
latest
0.5
0.4
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.