Skip to main content

a Database Wrapper for Redis and MySQL

Project description

a Database Wrapper for Redis and MySQL

from DBService import MysqlService

    mysql_server = MysqlService(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD, MYSQL_PORT)
    # query
    mysql_server.query("SELECT * FROM TABLE")
    # execute
    mysql_server.execute("UPDATE from TABLES SET a = 55 WHERE id = 1")
    # transaction
    mysql_server.query(["UPDATE from TABLES SET a = 55 WHERE id = 1","UPDATE from TABLES SET a = 545 WHERE id = 2"])

from DBService import RedisService

    redis_server = RedisService("redis://:user@host:port/db")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dbservice-2.0.0.tar.gz (13.5 kB view hashes)

Uploaded Source

Built Distribution

dbservice-2.0.0-py3-none-any.whl (13.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page