Skip to main content

A easy common db operation package

Project description

db公共模块

通用的数据库连接模块,目前能支持到mysql、pg、hive、impala、phoenix的连接和操作

功能规划

  • 基础功能:通用的连接接口,避免频繁操作原始的数据库接口
  • 线程池
  • 异步操作

使用说明

# 引入相应的数据库连接 目前支持mysql、impala、hive、pg、phoenix
# 分别对应MysqlDB、ImpalaDB、HiveDB、PgDB、PhoenixDB
from easy_db.db import MysqlDB

mysql_db = MysqlDB(
    user='bigdata',
    password='bluemoon2018#',
    database='xxl-job',
    host='192.168.235.3',
    port=3306
)

res = mysql_db.select('select * from demo')
print(res)

安装说明

方法1

  1. 使用git clone 把项目下载到本地
  2. 进入项目目录,运行python setup.py install 安装

方法2

直接把db.py 复制到项目中,引入相关的函数和类即可使用

方法3

pip install dm-easy-db

Package name: dm-easy-db Ver: 0.1.0

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

dm-easy-db-0.1.1.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dm_easy_db-0.1.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file dm-easy-db-0.1.1.tar.gz.

File metadata

  • Download URL: dm-easy-db-0.1.1.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.8.1 keyring/23.1.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

File hashes

Hashes for dm-easy-db-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7bf0b581c882ef92e35a6f78407ee0addc0a67e2b387149fa75377a426f3ee3b
MD5 2165581eadfec4bed1d309c97a65628c
BLAKE2b-256 99620b3862a0fa272ebc2b50da738cb7bd6a0af778b2b1b107441315618b5e88

See more details on using hashes here.

File details

Details for the file dm_easy_db-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: dm_easy_db-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.8.1 keyring/23.1.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

File hashes

Hashes for dm_easy_db-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 58422bffc02d625f2dc522591868103cb33820b52ea29c8b1852a6ccac5600cd
MD5 c777f73f3812f9eea2fd5f8e7ea7ec90
BLAKE2b-256 f6975ab0a10efff11f5fb280aea249e5f0ceb95c4f39dbd7f71c840a37d7e7a6

See more details on using hashes here.

Supported by

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