The code files for this chapter are available at https://git.io/fj2US.
One common approach is a single module. The overall organization can be imagined this way:
module.py
┣━━ class A:
┃ ┗━━ def method(self): ...
┣━━ class B:
┃ ┗━━ def method(self): ...
┗━━ def function(): ...
This example shows a single module with a number of classes and functions. We'll turn to module design in the Designing a module section, later in this chapter.
A more complex approach is a package of modules, which can be imagined as follows:
package
┣━━ __init__.py
┣━━ module1.py
┃ ┣━━ class A:
┃ ┃ ┗━━ def method(self): ...
┃ ┗...