Code Patterns

During the development of the package, it was necessary to create patterns on the code with the objective of organizing the code, making it easier for the crew to understand parts of the code that they didn't make. This also means that anyone out there that will contribute to our project with the Open Source principle, also has a better undestanding of the code.

Variables

For the variables, we used the snake_case pattern, in which all variables will be in lower case, in English and without accent or special characters. In case of variables with compound names, it was used underscore as a separator ( _ ). For constants, characters are all uppercase.

# Constants
VERSION = "3.0.0"

# Variables
element_name = "Name of element"
obj = "Object"

Classes and Methods

The name of the classes will follow the CamelCase pattern. The methods will, as well as the variables, follow the snake_case pattern.

class People:
   def __init__(self, name, age):
     self.name = name
     self.age = age

   def set.name(self, name):
     self.name = name

   def get.name(self):
     return self.name

Code Style

For verification and standardization of the code-style, it will be used the Flake8 package.