This project aims to read data from different types of files (CSV, JSON, XML), process and combine them, and then map the combined data to a MySQL database using Pony ORM. The goal is to provide a unified view of the data from various sources in a structured format in the database.
- Python 3.x
- pony.orm
- MySQL database How to install Myql Database
- csv (For test use
user_data_23_4.csvin the project directory) - json (For test use
user_data_23_4.xmlin the project directory) - xml.etree.ElementTree (For test use
user_data_23_4.xmlin the project directory)
To set up the project and run it locally:
- Clone repository:
git clone https://github.com/mainanorbert/File_Handling.git
- Navigate into the repository:
cd File_Handling - Install Virtual environment:
python3 -m venv .venv
- Activate Virtual Environment
. .venv/bin/activate - install Mysqlclient
pip install mysqlclient
- install ponyorm
pip install pony
- Run the program
python3 File_Integration_function
- The progran will generate
combined_data.jsoncontaining combined data from json, xml, and csv files - The program will also save the combined data to your mysql database
customer_data. in line 133 of the code, remember to provide the credentials for the program to access the database