class pyplanet.apps.Apps(instance)[source]

The apps class contains the context applications, loaded or not loaded in order of declaration or requirements if given by app configuration.

The apps should contain a configuration class that could be loaded for reading out metadata, options and other useful information such as description, author, version and more.


Check and remove unsupported apps based on the current game and script mode.


The discover function will discover all models, signals and more from apps in the right order.

populate(apps, in_order=False)[source]

Loads application into the apps registry. Once you populate, the order isn’t yet been decided. After all imports are done you should shuffle the apps list so it’s in the right order of execution!

  • apps (list) – Apps list.
  • in_order – Is the list already in order?
class pyplanet.apps.AppConfig(app_name, app_module, instance)[source]

This class is the base class for the Applications metadata class. The class holds information and hooks that will be executed after initiation for example.

class MyApp(AppConfig):

        async def on_start(self):
                print('we are staring!!')
app_dependencies = None
game_dependencies = None
human_name = None
static import_app(entry, instance)[source]
label = None
mode_dependencies = None
name = None

On destroy is being called when unloading the app from the memory.


The on_init will be called before all apps are started (just before the on_ready). This will allow the app to register things like commands, permissions and other things that are important and don’t require other apps to be ready.


The on_start call is being called after all apps has been started successfully. You should register any stuff that is related to any other apps and signals like your self context for signals if they are classmethods.


The on_stop will be called before stopping the app.

path = None

Deprecated since version 0.0.1: Use context.ui instead.

class pyplanet.apps.config._AppContext(app)[source]

The app context holds instances of core/contrib components that must be managed on a per app base. Such as the UI registration and distribution.

setting = None

Setting Contrib Component. See Setting Classes.

ui = None

UI Component. See UI Classes.