Basic SetupΒΆ

Suppose your app looks like this.

root_dir/
    app/
        __init__.py
    containers.xml
    main.py

containers.xml, which is the configuration of the framework, looks like this:

<imagination>
</imagination>

Tip

For more information about the DTD of the configuration file, please check out the DTD on GitHub.

main.py, which is the main script, looks like this:

from imagination.assembler.core import Assembler

assembler = Assembler()
assembler.load('containers.xml')

# TODO do something

Tip

Please remember that you can load multiple XML configuration files as shown in the following example:

assembler.load('config1.xml', 'config2.xml', ...)

Before you go further into the rabbit hole, you might want to keep Definitions used in this documentation handly.

Next step? Register a new entity without parameters.