3.4. Utility Functions¶
Below are the various utility functions and classes in Eve W-Space.
3.4.1. core¶
3.4.2. Map¶
- class Map.utils.MapJSONGenerator(map, user)[source]¶
A MapJSONGenerator is instantiated with a map and user. It provides a method that returns the JSON representation of the map.
- get_path_to_map_system(system)[source]¶
Returns a list of MapSystems on the route between the map root and the provided MapSystem.
- get_system_background(system)[source]¶
Takes a MapSystem and returns the appropriate background icon as a relative URL or None.
- get_system_icon(system)[source]¶
Takes a MapSystem and returns the appropriate icon to display on the map as a realative URL.
- class Map.utils.RouteFinder[source]¶
A RouteFinder object is created with two system objects and has methods for getting the shortest stargate jump route length, the light-year distance, and the shortest stargate route as a list of KSystem objects.
- Map.utils.convert_signature_id(sigid)[source]¶
Standardize the signature ID to XXX-XXX if info is available.
- Map.utils.get_possible_wh_types(system1, system2)[source]¶
Takes two systems and gets the possible wormhole types between them. For example, given system1 as highsec and system2 as C2, it should return R943 and B274. system1 is the source and system2 is the destination. Results are returned as lists because some combinations have multiple possibilities. Returns a dict in the format {system1: [R943,], system2: [B274,]}.