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
- 使用git clone 把项目下载到本地
- 进入项目目录,运行python setup.py install 安装
方法2
直接把db.py 复制到项目中,引入相关的函数和类即可使用
方法3
pip install dm-easy-db
Package name: dm-easy-db Ver: 0.1.0
Metadata
Release files for dm-easy-db 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dm-easy-db-0.1.1.tar.gz | 9.5 kB | Without provenance | Details for dm-easy-db-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dm_easy_db-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for dm_easy_db-0.1.1-py3-none-any.whl |
Total release size: 17.3 kB
Release files / dm-easy-db-0.1.1.tar.gz
| Download URL | dm-easy-db-0.1.1.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7bf0b581c882ef92e35a6f78407ee0addc0a67e2b387149fa75377a426f3ee3b
|
|
BLAKE2b-256 checksum How to use checksums |
99620b3862a0fa272ebc2b50da738cb7bd6a0af778b2b1b107441315618b5e88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / dm_easy_db-0.1.1-py3-none-any.whl
| Download URL | dm_easy_db-0.1.1-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
58422bffc02d625f2dc522591868103cb33820b52ea29c8b1852a6ccac5600cd
|
|
BLAKE2b-256 checksum How to use checksums |
f6975ab0a10efff11f5fb280aea249e5f0ceb95c4f39dbd7f71c840a37d7e7a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Security for dm-easy-db 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.