pyplanet.core.instance

PyPlanet Instance Module

This module holds the main instance class of the PyPlanet system.

pyplanet.core.instance.Controller = <pyplanet.core.controller._Controller object>

Controller access point to prevent circular imports. This is a lazy provided way to get the instance from anywhere! :type Controller: pyplanet.core.Controller :type: pyplanet.core.Controller

class pyplanet.core.instance.Instance(process_name)[source]

Controller Instance. The very base of the controller, containing class instances of all core components.

Variables:
  • process_name – Process and pool name.
  • loop – AsyncIO Event Loop.
  • game – Game Information class.
  • apps – Apps component.
  • gbx – Gbx component.
  • db – Database component.
  • storage – Storage component.
  • signals – Signal Manager (global). Please use the APP context Signal Manager instead!
  • ui_manager – UI Manager (global). Please use the APP context UI Manager instead!
  • map_manager – Contrib: Map Manager.
  • player_manager – Contrib: Player Manager.
  • permission_manager – Contrib: Permission Manager.
  • command_manager – Contrib: Command Manager.
  • setting_manager – Contrib: Setting Manager. Please use the APP context setting manager instead!
  • mode_manager – Contrib. Mode Manager.
performance_mode

Gives back a boolean, True if we are in performance mode.

Returns:Performance mode boolean.
start(run_forever=True)[source]

Start wrapper.

stop()[source]

Stop all the instance apps and managers.