diff options
author | Yves Fischer <yvesf-git@xapek.org> | 2018-07-23 11:32:46 +0200 |
---|---|---|
committer | Yves Fischer <yvesf-git@xapek.org> | 2018-07-23 11:32:46 +0200 |
commit | 5d421ad266907a66b937338c8ea54df085f47bae (patch) | |
tree | 27897cc8a4d4e2bd41312246174612050765a618 /jobs | |
parent | 69c220cda3d8c0a95327630f5752dad36cb82261 (diff) | |
download | datasources-5d421ad266907a66b937338c8ea54df085f47bae.tar.gz datasources-5d421ad266907a66b937338c8ea54df085f47bae.zip |
add tankerkoenig example execution
Diffstat (limited to 'jobs')
-rwxr-xr-x | jobs/tankerkoenig.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/jobs/tankerkoenig.py b/jobs/tankerkoenig.py index e78853d..90b92ba 100755 --- a/jobs/tankerkoenig.py +++ b/jobs/tankerkoenig.py @@ -34,3 +34,16 @@ def execute(api_key : str, lat: float, lng : float, rad: float) -> typing.Iterab except Exception as e: logging.error("Failed for: %f %f %f", lat, lng, rad) raise e + + +if __name__ == '__main__': + import argparse + import pprint + parser = argparse.ArgumentParser() + parser.add_argument("--api-key", nargs=1, default='00000000-0000-0000-0000-000000000002', required=True) + args = parser.parse_args() + api_key = args.api_key[0] + + print(api_key) + data = execute(api_key, 48.651822, 7.927891, 15.0) + pprint.pprint(list(data)) |