Skip to content

An employee time tracking software to apply knowledge of integrated PostgreSQL database transactions in a Python environment.

Notifications You must be signed in to change notification settings

amar-sinha/employee-time-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Employee Time Tracker Application

A PostgreSQL-Python Integrated Implementation

A Python program implemented to track employees' time records and export time report records.

Goal

To develop an employee time tracking software to apply knowledge of integrated PostgreSQL database transactions. The program will store and record timesheet data and users (admins and employees). The database has two tables to store the data, as described in the PostgreSQL & Database Specifications section below.

Implementation

The employee time tracking software is implemented with a Python program and PostgreSQL database integration. The database is remotely hosted on the Heroku Cloud Platform. The program utilizes the psycopg2 Python package to provide the communication between Python and PostgreSQL. The Python program provides a graphical user-interface (GUI) implemented using the tkinter GUI toolkit package.

Package Installation

Install tkinter

$ pip install tkinter

Install Heroku (macOs)

$ brew tap heroku/brew && brew install heroku

PostgreSQL & Database Specifications

Create an app on the Heroku Cloud Platform service (https://www.heroku.com/). Configure the app with the Heroku Postgres add-on (https://elements.heroku.com/addons/heroku-postgresql) attached as the app's database.

To ensure the program executes with no errors, make sure that the PostgreSQL database specifications in the Python program are correct. These specifications can be found at the top of the program, and look as such:

PROC = subprocess.Popen('heroku config:get DATABASE_URL -a project-name-here', stdout=subprocess.PIPE, shell=True)
DB_URL = PROC.stdout.read().decode('utf-8').strip() + '?sslmode=require'

Since the database URL is dynamic and can change regularly, the use of the suprocess.Popen method call allows the program to grab the most current database URL to ensure proper connection to the database.

Furthermore, the database implemented for use with this software consists of two tables, one for storing users and a second for storing daily time report recordings. A visual representation is provided below:

db_structure

Program Specifications

  • Main Panel -

  • Admin Panel -

  • Add/Remove Employee Panels -

  • Employee Panel -

About

An employee time tracking software to apply knowledge of integrated PostgreSQL database transactions in a Python environment.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages