Naming conventions in Python language and frameworks
Python
Structure | Case | Example | |
---|---|---|---|
Class | UpperCamelCase | MyClass, Class | |
Function | lowercase, underscores | function, my_function | |
Method | lowercase, underscores | _non_public, method | |
Variable | lowercase , underscores | var, my_var | |
Module | lowercase, underscores | module.py, my_module.py | |
Constant | UPPERCASE, UNSERSORE_SEPARATED | MY_CONSTANT |