3.4. Utility Functions

Below are the various utility functions and classes in Eve W-Space.

3.4.1. core

core.utils.get_config(name, user)[source]

Gets the correct config value for the given key name. Value with the given user has priority over any default value.

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.


Returns a list of MapSystems on the route between the map root and the provided MapSystem.


Takes a MapSystem and returns the appropriate background icon as a relative URL or None.


Takes a MapSystem and returns the appropriate icon to display on the map as a realative URL.


Returns a JSON string representing the systems in a map.

recursive_system_data_generator(start_sys, syslist, levelX)[source]

Prepares a list of MapSystem objects for conversion to JSON for map JS. Takes a queryset of MapSystems and the current list of systems prepared for JSON.

system_to_dict(system, levelX)[source]

Takes a MapSystem and X,Y data and returns the dict of information to be passed to the map JS as JSON.

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.


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,]}.

Map.utils.get_wormhole_type(system1, system2)[source]

Gets the one-way wormhole types between system1 and system2.

3.4.3. POS


Accepts a list of corp poses and returns a list of POSes with status information attached.

A posstatus object has the following attributes: itemid: the POS item id pos: POS object processed status: Status retrieved

3.4.4. account


Returns a list of groups for a given registration code.

account.utils.register_groups(user, regcode)[source]

Registers a user for all groups associated with a registration code.

3.4.5. Alerts

3.4.6. API


Converts a UNIX Timestamp (in UTC) to a python DateTime

3.4.7. SiteTracker

3.4.8. Recruitment

3.4.9. Teamspeak

3.4.10. Jabber

3.4.11. Cart