Package Manager

Package manager for worlds available to download and use for Holodeck

Functions

available_packages() Returns a list of package names available for the current version of Holodeck
get_binary_path_for_package(package_name) Gets the path to the binary of a specific package.
get_binary_path_for_scenario(scenario_name) Gets the path to the binary for a given scenario name
get_package_config_for_scenario(scenario) For the given scenario, returns the package config associated with it (config.json)
get_scenario(scenario_name) Gets the scenario configuration associated with the given name
install(package_name[, url]) Installs a holodeck package.
installed_packages() Returns a list of all installed packages
load_scenario_file(scenario_path) Loads the scenario config file and returns a dictionary containing the configuration
package_info(pkg_name) Prints the information of a package.
prune() Prunes old versions of holodeck, other than the running version.
remove(package_name) Removes a holodeck package.
remove_all_packages() Removes all holodeck packages.
scenario_info([scenario_name, scenario, …]) Gets and prints information for a particular scenario file
world_info(world_name[, world_config, …]) Gets and prints the information of a world.
holodeck.packagemanager.available_packages()

Returns a list of package names available for the current version of Holodeck

Returns (list of str):
List of package names
holodeck.packagemanager.get_binary_path_for_package(package_name)

Gets the path to the binary of a specific package.

Parameters:package_name (str) – Name of the package to search for
Returns:Returns the path to the config directory
Return type:str
Raises:NotFoundException – When the package requested is not found
holodeck.packagemanager.get_binary_path_for_scenario(scenario_name)

Gets the path to the binary for a given scenario name

Parameters:scenario_name (str) – name of the configuration to load - eg “UrbanCity-Follow” Must be an exact match. Name must be unique among all installed packages
Returns:A dictionary containing the configuration file
Return type:dict
holodeck.packagemanager.get_package_config_for_scenario(scenario)

For the given scenario, returns the package config associated with it (config.json)

Parameters:scenario (dict) – scenario dict to look up the package for
Returns:package configuration dictionary
Return type:dict
holodeck.packagemanager.get_scenario(scenario_name)

Gets the scenario configuration associated with the given name

Parameters:scenario_name (str) – name of the configuration to load - eg “UrbanCity-Follow” Must be an exact match. Name must be unique among all installed packages
Returns:A dictionary containing the configuration file
Return type:dict
holodeck.packagemanager.install(package_name, url=None)

Installs a holodeck package.

Parameters:package_name (str) – The name of the package to install
holodeck.packagemanager.installed_packages()

Returns a list of all installed packages

Returns:List of all the currently installed packages
Return type:list of str
holodeck.packagemanager.load_scenario_file(scenario_path)

Loads the scenario config file and returns a dictionary containing the configuration

Parameters:scenario_path (str) – Path to the configuration file
Returns:A dictionary containing the configuration file
Return type:dict
holodeck.packagemanager.package_info(pkg_name)

Prints the information of a package.

Parameters:pkg_name (str) – The name of the desired package to get information
holodeck.packagemanager.prune()

Prunes old versions of holodeck, other than the running version.

DO NOT USE WITH HOLODECKPATH

Don’t use this function if you have overidden the path.

holodeck.packagemanager.remove(package_name)

Removes a holodeck package.

Parameters:package_name (str) – the name of the package to remove
holodeck.packagemanager.remove_all_packages()

Removes all holodeck packages.

holodeck.packagemanager.scenario_info(scenario_name='', scenario=None, base_indent=0)

Gets and prints information for a particular scenario file Must match this format: scenario_name.json

Parameters:
  • scenario_name (str) – The name of the scenario
  • scenario (dict, optional) – Loaded dictionary config (overrides world_name and scenario_name)
  • base_indent (int, optional) – How much to indent output by
holodeck.packagemanager.world_info(world_name, world_config=None, base_indent=0)

Gets and prints the information of a world.

Parameters:
  • world_name (str) – the name of the world to retrieve information for
  • world_config (dict, optional) – A dictionary containing the world’s configuration. Will find the config if None. Defaults to None.
  • base_indent (int, optional) – How much to indent output