set up gateway python code for ontology id and new database settings