Total Complexity | 0 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | # -*- coding: utf-8 -*- |
||
2 | |||
3 | |||
4 | from data import config |
||
5 | import mysql.connector |
||
6 | import logging |
||
7 | |||
8 | |||
9 | """ |
||
10 | |||
11 | |||
12 | Created on 24.09.2021 |
||
13 | |||
14 | @author: Nikita |
||
15 | |||
16 | |||
17 | """ |
||
18 | |||
19 | |||
20 | db = mysql.connector.connect(host=config.host, |
||
21 | database=config.database, |
||
22 | user=config.user, |
||
23 | password=config.password) |
||
24 | |||
25 | cursor = db.cursor() |
||
26 | |||
27 | logging.info('The connection to the database is established!') |
||
28 |