Boot structure
main() -+
      App() --+
              +- __init__() -+
              |              |
              |              +-- command line options handling / parsing
              |              +-- xdm.init.preDB(): path and folder setup
              |              +-- xdm.init.db(): database initialisation and migration
              |              +-- xdm.init.postDB(): plugin loading
              |              +-- xdm.init.schedule(): recuring shedular setup and starting
              |              +-- xdm.init.runTasks(): initial (cleanup) tasks
              +- startWebServer(): (optional)
              +- starting of the API: (optional)
              +- main while loop with KeyboardInterrupt handler

The common object

There is a xdm.common object based on xdm.Common it holds following object references.

Example for PM

from xdm import common
for mediaTypeManager in common.PM.getMediaTypeManager():
   print mediaTypeManager.indentifier

instantiated during import

instantiated during boot

Statuses available for Elements set during xdm.init_checkDefaults() (done in xdm.init.db() in App.__init__())


Any plugin is prohibited from setting any of these attributes. At time of writing there is no measurement in place to prevent this.

class xdm.Common

A class that conveniently holds references to common objects and variables @DynamicAttrs


get all available status instances


get statuses that are shown on the completed page


get the (file) of the DownloadType defined by downloadTypeIdentifier if none is found will return txt


get all available status instances except statuses in the list notWantedStatuses


get statuses that are shown on the home/index page


get the current local string e.g. en_US e.g. de

this is either the system language / locale or the user set language or the fallback to en_US


get a status be the database id


return a tuple of the current version

isThisVersionNewer(major, minor, revision, build)

return bool weather the running version is OLDER then the one build by the params