aboutsummaryrefslogtreecommitdiff
path: root/backend/tilo.py
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2023-01-23 18:00:43 +1100
committerTerry Truong <terry06890@gmail.com>2023-01-23 18:01:13 +1100
commit94a8ad9b067e5a2c442ce47ce72d1a53eb444160 (patch)
tree2056373ee56b8b2f8269ac3e94d40f8f0e6eec0d /backend/tilo.py
parent796c4e5660b1006575b8f2af9d99e2ce592c767a (diff)
Clean up some docs and naming inconsistencies
Diffstat (limited to 'backend/tilo.py')
-rwxr-xr-xbackend/tilo.py18
1 files changed, 6 insertions, 12 deletions
diff --git a/backend/tilo.py b/backend/tilo.py
index dfefab1..21b5a7f 100755
--- a/backend/tilo.py
+++ b/backend/tilo.py
@@ -1,11 +1,4 @@
-#!/usr/bin/python3
-
-from typing import Iterable, cast
-import sys, re
-import urllib.parse, sqlite3
-import gzip, jsonpickle
-
-HELP_INFO = """
+"""
WSGI script that serves tree-of-life data, in JSON form.
Expected HTTP query parameters:
@@ -23,10 +16,11 @@ Expected HTTP query parameters:
weakly-trimmed, images-only, and picked-nodes trees. The default
is 'images'.
"""
-if __name__ == '__main__':
- import argparse
- parser = argparse.ArgumentParser(description=HELP_INFO, formatter_class=argparse.RawDescriptionHelpFormatter)
- parser.parse_args()
+
+from typing import Iterable, cast
+import sys, re
+import urllib.parse, sqlite3
+import gzip, jsonpickle
DB_FILE = 'tol_data/data.db'
DEFAULT_SUGG_LIM = 5