This program is a local file storage database for storage utilizing the MySQL standard query language.
The program is licensed under GNU Public License v3.0
This program runs on Windows 10 and Debian-based Linux, written in Python 3.9 and updated to version 3.10.6
- Run the setup.py script to build a virtual environment and install all external packages in the created venv.
Examples:
- Windows:python setup.py venv
- Linux:python3 setup.py venv
- Once virtual env is built traverse to the (Scripts-Windows or bin-Linux) directory in the environment folder just created.
- For Windows, in the venv\Scripts directory, execute
activate
oractivate.bat
script to activate the virtual environment. - For Linux, in the venv/bin directory, execute
source activate
to activate the virtual environment. - If for some reason issues are experienced with the setup script, the alternative is to manually create an environment, activate it, then run pip install -r packages.txt in project root.
- To exit from the virtual environment when finished, execute
deactivate
.
- Once the virtual environment is activated, traverse to the directory containing the program and execute in shell
- Execute to access the command menu
-- file_database.py --
get_by_index - Finds file name in storage location based on passed in index.
delete_file - Delete file stored in the storage database.
store_file - Stores file in the storage database.
extract_file - Extracts file from the storage database to Dock.
list_storage - Queries database for list of all files and displays as enumerated list to the user.
main_menu - Display command options and receives input on what command to execute.
main - Ensures critical directories are created, checks id database exists & creates if non-existent, and calls MainMenu().
-- utils.py --
db_error_query - Looks up the exact error raised by database error catch-all handler.
query_db_create - MySQL query to create the Storage table.
query_item_delete - MySQL query to delete item from storage database.
query_item_fetch - MySQL query to retrieve item from storage database.
query_select_all  l- MySQL query to retrieve all contents of storage database.
query_store_item - MySQL query to store data into the Storage database.
print_err - Displays error message via stderr for supplied time interval.
-- file_database.py --
0 - Successful operation (main, main_menu)
1 - Error occurred acquiring semaphore for database connection (main)
2 - Critical error occurred during database operation (main)
-- utils.py --
3 - Passed in MySQL query is not a complete statement (query_handler)
4 - Fetch flag was set to unknown value (query_handler)