select Id, Name, Age
from Person
where Id = :person_id
and the python code could be
cm = ConnectionManager(queries_dir="queries") # directory called queries holds the named sql files
params = {"person_id": 5}
person_record = cm.record(
sql=None,
sql_file="get_person", # meaning the get_person.sql file in the designated queries directory
con_name="my-database",
params=params
)
where get_person.sql could be
and the python code could be