Coder Social home page Coder Social logo

amar-sinha / employee-time-tracker Goto Github PK

View Code? Open in Web Editor NEW
6.0 0.0 5.0 372 KB

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

Python 100.00%
postgresql-database python heroku-cloud-platform tkinter employee-management

employee-time-tracker's Introduction

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 -

employee-time-tracker's People

Contributors

amar-sinha avatar hkhan925 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

employee-time-tracker's Issues

Connection to database failed.

Hello

I have already added dyno formation (web gunicorn gettingstarted.wsgi) and installed add-ons (postgresql-elliptical-21080).
Here is the url of my app - https://dashboard.heroku.com/apps/lit-forest-50169

Here is the code chunk of my directory I have changed

PROC = subprocess.Popen('heroku config:get postgresql-elliptical-21080 -a lit-forest-50169', stdout=subprocess.PIPE, shell=True) DB_URL = PROC.stdout.read().decode('utf-8').strip() + '?sslmode=require'

When I run panels.py file it has a error and returns "Connection to database failed." output.
Something is wrong with a code chunk I wrote above.

Please help me to correct the code.

Usage

Please write a bit of usage example, how to use it for the first time.
If you can provide any video url , I will be very glad.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.