Writing applications with modjy.

How modjy locates application callable objects.

According to the WSGI specification, all WSGI applications must be python callable objects, taking a defined parameter list. Application callables can be python functions, class instances with a call() method, or indeed any callable object.

There are two different mechanisms by which you can specify application callable objects to modjy. They are

  1. By specifying a single importable name. This requires specifying the name fully-package-qualified name of an importable WSGI handler, e.g. some_framework.web.handlers.WSGIHandler. This is the preferred mechanism, and takes precedence over the other mechanism, if configuration values are provided for both import mechanisms. To read more about this mechanism, see the importing applications page.
  2. By specifying a combination of three names, a directory name, a file name, and a callable name. To read more about this mechanism, see the execfile page

If configuration values for both of these mechanisms are provided, then the importable mechanism takes precedence.

Add picture from clipboard (Maximum size: 10 MB)