Cohesion: A tool for measuring Python class cohesion

Build Status Build Status Coverage Status Python Versions PyPI Version

Cohesion is a tool for measuring Python class cohesion.

In computer programming, cohesion refers to the degree to which the elements of a module belong together. Thus, cohesion measures the strength of relationship between pieces of functionality within a given module. For example, in highly cohesive systems functionality is strongly related.

When cohesion is high, it means that the methods and variables of the class are co-dependent and hang together as a logical whole.

Some of the advantages of high cohesion, also by Wikipedia: