Skip to content
Snippets Groups Projects
Select Git revision
  • 061d018e851a14513333255a18ecdf9301a43ec8
  • main default
  • styling
  • updated_prediction_service
4 results

setup.py

Blame
  • user avatar
    EC2 Default User authored
    061d018e
    History
    setup.py 585 B
    import sqlite3
     
    # connecting to the database
    connection = sqlite3.connect("../db/digpath.db")
     
    # cursor
    crsr = connection.cursor()
     
    # SQL command to create a table in the database
    sql_command = """
        CREATE TABLE requests (
            request_id TEXT(255) PRIMARY KEY,
            file TEXT(255),
            diagnosis TEXT(255),
            total_chips INTEGER,
            mild INTEGER,
            moderate INTEGER,
            severe INTEGER,
            status TEXT(255),
            timestamp TEXT(255)
        );
    """
     
    # execute the statement
    crsr.execute(sql_command)
     
    # close the connection
    connection.close()