utils module¶
- astrodbkit2.utils.datetime_json_parser(json_dict)[source]¶
Function to convert JSON dictionary objects to datetime when possible. This is required to get datetime objects into the database. Adapted from: https://stackoverflow.com/questions/8793448/how-to-convert-to-a-python-datetime-object-with-json-loads
- astrodbkit2.utils.deprecated_alias(**aliases)[source]¶
Decorator from StackOverflow https://stackoverflow.com/questions/49802412/how-to-implement-deprecation-in-python-with-argument-alias in order to handle deprecation of renamed columns To use: add @deprecated_alias(old_name=’new_name’)
- astrodbkit2.utils.get_simbad_names(name, verbose=False)[source]¶
Get list of alternate names from Simbad
- Parameters:
- namestr
Name to resolve
- verbosebool
Verbosity flag
- Returns:
- List of names