Its is a simple CLI application I made during the Intern phase, I have used postgres to store the user's (student in this case) data. To run this please makesure you have postgres installed. You can follow a guide online. Makse sure you have created a DB folder and makesure to add following file inside.
-
from configparser import ConfigParser def load_config(filename='DB/database.ini', section='postgresql'): parser = ConfigParser() parser.read(filename) config = {} if parser.has_section(section): params = parser.items(section) for param in params: config[param[0]] = param[1] else: raise Exception(f'Section {section} not found in the {filename} file') return config if __name__ == '__main__': config = load_config()
[postgresql]
host=localhost
database=db_name
user=postgres
password=password
Dont forget to change the values in the databse.ini
with your credentials.
Now to run the app simply run
python3 Educationhub.py
- Add option to add and remove academy [x]
- Cleaning and simple housekeeping [x]
- Error handeling [x]