FactoryMethod API Documentation
- class Product[source]
Bases:
ABCAbstract base class for products.
This class defines the interface for all concrete products created by the factory method. All subclasses must implement the
usemethod.
- class ConcreteProductA[source]
Bases:
ProductConcrete implementation of the Product interface.
Represents a specific type of product with its own behavior.
- class ConcreteProductB[source]
Bases:
ProductConcrete implementation of the Product interface.
Represents another type of product with its own behavior.
- class Creator[source]
Bases:
ABCAbstract base class for creators (factories).
Declares the factory method that subclasses must implement to create specific product instances. Provides a common operation that uses the product created by the factory method.
- class ConcreteCreatorA[source]
Bases:
CreatorConcrete implementation of the Creator class.
Responsible for creating instances of ConcreteProductA.