Clone wiki

agatsuma / Naming_convention

Python code

  • module_name, package_name, ClassName, method_name, ExceptionName, function_name, GLOBAL_VAR_NAME, instance_var_name, function_parameter_name, local_var_name.


Spell name

We need to use easy-to-read names. Sometimes real name of class may be too long or, simply, dirty. In most cases easier to use just a name of spell, not a class. For example:

class IFooExampleBarClassSpell(...):

It isn't easy to read and write in configs, code etc. Much more easier to use more readable name like:


Now just see to class name and our shortcut, now you see difference, i believe. You just need to use this names as atoms in code and in configs, so all will be ok.

  • For classes FooNameSpell we are using foo_name shortcuts.
  • For interfaces IFooNameSpell - i_foo_name_spell

Spell address

For some reasons we need to use chained atoms, cuz spell is a class, which placed in the package, which placed in sub-namespace. For example:

agatsuma.spells.web.tornado.support_spell - module
from agatsuma.spells.web.tornado.support_spell