working directory db
This commit is contained in:
3
db/.gitignore
vendored
Normal file
3
db/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
./__pycache__
|
||||
*.log
|
||||
./network/__pycache__/*
|
10
db/connectdb.py
Normal file
10
db/connectdb.py
Normal file
@@ -0,0 +1,10 @@
|
||||
import mysql.connector
|
||||
import logging
|
||||
|
||||
logging.basicConfig( format='%(asctime)-15s [%(levelname)s] %(funcName)s: %(message)s', level=logging.DEBUG)
|
||||
|
||||
mydb = mysql.connector.connect(host='database', user='ploeger',password='SW_Ep.6:ROTJ',database='weather')
|
||||
logging.debug(f'Datenbankverbindung aufgebaut ${mydb}')
|
||||
mycursor = mydb.cursor()
|
||||
logging.debug(f'Cursor gesetzt ${mycursor}')
|
||||
|
Reference in New Issue
Block a user