py_tools_ds.db_tools package¶
Submodules¶
py_tools_ds.db_tools.sql module¶
- py_tools_ds.db_tools.sql.data_DB_updater(gms_obj_dict: dict, path_db: str) None [source]¶
Update the table “scenes_proc” or “mgrs_tiles_proc within a postgreSQL or an SQL database according to the given dictionary of a GMS object.
- Parameters
gms_obj_dict – <dict> a copy of the dictionary of the respective GMS object
- py_tools_ds.db_tools.sql.get_info_from_SQLdb(path_db: str, tablename: str, vals2return: list, cond_dict: dict, records2fetch: int = 0) Union[list, str] [source]¶
Query an SQL database for the given parameters.
- Parameters
path_db – <str> the physical path of the SQL database on disk
tablename – <str> name of the table within the database to be queried
vals2return – <list or str> a list of strings containing the column titles of the values to be returned
cond_dict – <dict> a dictionary containing the query conditions in the form {‘column_name’:<value>}
records2fetch – <int> number of records to be fetched (default=0: fetch unlimited records)