This Python script is designed to fetch, process, and display candidate data from a given URL. It consists of three main steps: data extraction, data transformation, and output generation.
The script performs the following operations:
- Data Extraction: Fetches raw candidate data from a given URL using the
DataExtractorclass. - Data Transformation: Processes the raw data to extract and structure the relevant information using the
DataTransformerclass. - Output Generation: Displays the processed data on the console using the
OutputGeneratorclass.
The implementation was divided into three core components to ensure clarity, maintainability, and scalability:
-
Data Extraction:
TheDataExtractorclass fetches raw data from a given source, such as a URL, text file, or JSON file. This modular design allows for easy extension to support different data sources without affecting other parts of the application. -
Data Transformation:
TheDataTransformerclass processes and structures the data. Isolating this logic makes it easier to maintain and adapt if the data format changes. -
Output Generation:
TheOutputGeneratorclass handles displaying the processed data. This separation allows for easy adjustments to how data is presented (e.g., in a GUI or file export) without impacting data extraction or transformation.
This separation of concerns follows the principles of modular design, allowing each class to focus on a specific task and making it easier to maintain and extend the application in the future.
No external libraries or dependencies are required to run this script. It uses only standard Python libraries.
First, clone the repository to your local machine:
git clone "https://github.com/arik-leikin-hs/HomeAssignment.git"If you would like to fetch data from a different URL, open the main.py file and locate the following line:
CANDIDATES_URL = "<URL-SAMPLE>"python main.py