import  pymysql
import redis

""" connect servers as a client. 

including:
- redis
- mysql
- nats
- zookeeper
"""


def conn_redis(host, port, user, password, db):
    return redis.Redis(host=host, port=port, password=password, db=db)


def conn_mysql(host, port, user, password, db):
    return pymysql.connect(host=host, port=port, user=user, password=password, database=db, charset='utf8')


def conn_nats(host, port, user, password, clientId):
    raise NotImplemented()
