Skip to content

awpala/py-debugging-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Example: Simple Database Console Application

Overview

See here for a step-by-step guide for debugging this application.

To run this application, issue the following terminal command from the top-level project directory (i.e., /py-debugging-example):

python main.py <filename> 

(where <filename> is the desired filename intended to store the database data, e.g., users.txt)

Description of Files

Filename Description
main.py contains the entrypoint of the application
user.py defines the central entity user via corresponding class User, which in turn populates the constituent database
database.py defines the class Database which performs create/read/update/delete (i.e., full "CRUD") operations
utils.py defines helper utilities for parsing user inputs
file_manager.py defines the class FileManager which performs file read/write operations on the underlying database file (e.g., users.txt), in order to persist the users in local memory between runs of the application

Unit Tests

Unit tests are provided in /__tests__. To run, issue the following terminal command:

python -m unittest discover -s __tests__ -p *test*.py

Additionally, see /.vscode/settings.json for corresponding configuration for VS Code extension for Python.

About

A basic console application written in Python, used for demonstrating the VS Code debugger.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages