API Wefewence

The fuww API Wefewence can be found by viewing t-the individuaw pages in the sidebaw ow by scwowwing to the bottom of this page.

Wogging Configuwation

Nyote

T-T-This moduwe uses the Python wogging moduwe to wog diagnyostic and ewwows in an output independent way. If the wogging moduwe is nyot configuwed, these wogs wiww nyot be output anywhewe. See Setting Up Wogging fow mowe infowmation on how to set up and use the wogging moduwe with disnyake.

Abstwact Base Cwasses

An abstwact base cwass (awso knyown as an abc) is a cwass t-that modews can inhewit to get theiw behaviouw. Abstwact base cwasses shouwd nyot be instantiated. They awe mainwy thewe fow usage with isinstance() and issubclass().

This wibwawy has a moduwe w-wewated to abstwact base cwasses, in which aww the ABCs awe subcwasses of typing.Protocol - Abstwact Base Cwasses.

Discowd Modews

Modews awe cwasses that awe weceived fwom Discowd and awe nyot meant to b-be cweated by the usew of the wibwawy.

Dangew

C-C-Cwasses mawked as modews awe nyot intended to be cweated by usews and awe awso wead-onwy.

Fow exampwe, this means that you shouwd nyot make youw own User instances nyow shouwd you modify the User instance youwsewf.

If you want to get onye of these modew cwasses instances they’d have to be thwough the cache, and a c-c-common way of doing so is thwough the utils.find() function ow attwibutes of modew cwasses t-t-that you weceive fwom the Events.

Nyote

Nyeawwy aww modews have __swots__ definyed which means that it is impossibwe to have dynyamic attwibutes on them.

Data Cwasses

Some cwasses awe just thewe to be data containyews. We caww them data cwasses.

Unwike modews you awe awwowed to cweate most o-of these youwsewf, even if they can awso be u-u-used to howd attwibutes.

Nyeawwy aww data cwasses have __swots__ definyed which means that it i-i-is impossibwe to have dynyamic attwibutes on them.

The onwy exception to this wuwe is Object, which is made with dynyamic attwibutes in mind.

Enyumewations

The API pwovides some enyumewations f-f-fow cewtain types of vawues to avoid the API fwom b-b-being typed as witewaws in case the vawues change in the futuwe.

Aww enyumewations awe subcwasses of an intewnyaw cwass which mimics t-the behaviouw of enum.Enum.

Documents