Where to store a function that involves two entities?

I have two tables in my database. Companies and Sites. Each Company has many Sites. The Sites table has has a foreign key of CompanyID. I have a data layer class for each entity, one for the company, and one for the site. I need to get the CompanyID by the SiteID and so I… Read More Where to store a function that involves two entities?

What am I doing incorrect in this directory search python code?

What am I doing wrong in the following source code and how can I fix that? my_script.py import subprocess import os import time from pathlib import Path def get_files(dir_str): onlyfiles = next(os.walk(dir_str))[2] return onlyfiles input_files_path_str = "$HOME" def main(): input_files_list = get_files(input_files_path_str) print(input_files_list) if __name__=="__main__": main() Output: user_name@server_name:~$ python3 my_script.py Traceback (most recent call last):… Read More What am I doing incorrect in this directory search python code?