21 lines
431 B
Python
21 lines
431 B
Python
|
import mysql.connector
|
||
|
import redis
|
||
|
import os
|
||
|
|
||
|
from app.config import RedisConfig
|
||
|
from app.config import MySqlConfig
|
||
|
|
||
|
db_connection = mysql.connector.connect(
|
||
|
host=MySqlConfig.MYSQL_HOST,
|
||
|
user=MySqlConfig.MYSQL_USER,
|
||
|
password=MySqlConfig.MYSQL_PASSWORD,
|
||
|
database=MySqlConfig.MYSQL_DATABASE,
|
||
|
)
|
||
|
|
||
|
jwt_redis_blocklist = redis.StrictRedis(
|
||
|
host=RedisConfig.REDIS_HOST,
|
||
|
port=RedisConfig.REDIS_PORT,
|
||
|
db=0,
|
||
|
decode_responses=True
|
||
|
)
|