In Java, I only put one public class in one file I don't know what to do with Python.
Some modules have only one class There's a lot on some modules.
What is the standard for making a module in Python?
abstract-class python
Each Python file is called a module, and the directory structure that manages multiple modules in layers is called a package.
Unlike Java, a Python module can have multiple classes. Because the criteria for making Python modules is "make sense" rather than the number of classes.
It's weird to translate "make sense" into Korean, but you can think of it as focusing on "reusability."
For example, apscheduler
The apscheduler is a package that manages the module about the schedule
In this package, apscheduler.events
/ apscheduler.job
/ apscheduler.Each module, such as schedulers
, manages the event
/job
/scheduler
.
© 2025 OneMinuteCode. All rights reserved.