Defining macros using Python classes (or, at least through Python interfaces) is done in one of three ways: INI files, Python classes, and the document context. These three methods are described in the following sections.