location: add all.py, using takeout/gpslogger/ip
This commit is contained in:
parent
66a00c6ada
commit
ca10d524a4
12 changed files with 357 additions and 27 deletions
28
my/ip/all.py
Normal file
28
my/ip/all.py
Normal file
|
@ -0,0 +1,28 @@
|
|||
"""
|
||||
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
|
||||
|
||||
from .common import IP
|
||||
|
||||
|
||||
def ips() -> Iterator[IP]:
|
||||
yield from ()
|
||||
|
||||
|
||||
def stats() -> Stats:
|
||||
from my.core import stat
|
||||
|
||||
return {
|
||||
**stat(ips),
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue