scopesim.server.database.get_all_packages_on_server#
- scopesim.server.database.get_all_packages_on_server() Iterator[tuple[str, set]]#
Retrieve all unique package names present on server in known folders.
Currently hardcoded to look in folders “locations”, “telescopes” and “instruments”. Any packages not in these folders are not returned.
This generator function yields key-value pairs, containing the folder name as the key and the set of unique package names in value. Recommended useage is to turn the generator into a dictionary, i.e.:
- ::
package_dict = dict(get_all_packages_on_server())
- Yields:
Iterator[tuple[str, set]] – Key-value pairs of folder and corresponding package names.