From 5dd5ed8757c36a91e5031a3a55ea8a4291714691 Mon Sep 17 00:00:00 2001 From: jwansek Date: Fri, 28 Apr 2023 13:11:44 +0100 Subject: Added searching for businesses --- insinuations.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'insinuations.py') diff --git a/insinuations.py b/insinuations.py index a94607b..282b93e 100644 --- a/insinuations.py +++ b/insinuations.py @@ -70,13 +70,12 @@ def lookup_company(company_number): return company if __name__ == "__main__": - # if not os.path.exists(".docker"): - # import dotenv - # dotenv.load_dotenv(dotenv_path = "db.env") - # host = "srv.home" - # else: - # host = "db" - - # with database.PayGapDatabase(host = host) as db: - # get_sics(db) - print(lookup_company("02838054")) \ No newline at end of file + if not os.path.exists(".docker"): + import dotenv + dotenv.load_dotenv(dotenv_path = "db.env") + host = "localhost" + else: + host = "db" + + with database.PayGapDatabase(host = host) as db: + print(db.search_company("University")) \ No newline at end of file -- cgit v1.2.3