HPI/my/ip/all.py
seanbreckenridge 2cb836181b
location: add all.py, using takeout/gpslogger/ip (#237)
* location: add all.py, using takeout/gpslogger/ip, update docs
2022-04-26 21:11:35 +01:00

29 lines
565 B
Python

"""
An example all.py stub module that provides ip data
To use this, you'd add IP providers that yield IPs to the 'ips' function
For an example of how this could be used, see https://github.com/seanbreckenridge/HPI/tree/master/my/ip
"""
REQUIRES = ["git+https://github.com/seanbreckenridge/ipgeocache"]
from typing import Iterator
from my.core.common import Stats, warn_if_empty
from .common import IP
@warn_if_empty
def ips() -> Iterator[IP]:
yield from ()
def stats() -> Stats:
from my.core import stat
return {
**stat(ips),
}