发送邮件库
Project description
使用说明
变量环境设置(数据库的链接信息存储在变量环境中)
# 设置环境变量 user 是用户名,password 是密码,192.168.1.10:22484 数据库地址
os.environ['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://user:password@192.168.1.10:22484/'
# 获取环境变量,如果不存在则使用默认值
value = os.environ.get('SQLALCHEMY_DATABASE_URI', 'default_value')
print(value+"DY_DSLP")
1、安装包模块
pip install mjsqltool
pip install --upgrade mjsqltool
2、引入包模块
from mjsqltool import SqlConnect,DataConvert,SqlExecute
SqlConnect
链接数据库,使用完毕后自动关闭
# 数据库名称
db = 'database'
with SqlConnect(db) as cn:
.....
DataConvert
数据转换
convert = DataConvert()
df = pd.read_exce("jjjj.xlsx")
convert.convert_to_cleandata(df)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mjsqltool-1.1.4.tar.gz
(9.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mjsqltool-1.1.4.tar.gz.
File metadata
- Download URL: mjsqltool-1.1.4.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d197481cdc66ea0e0e2f03538a65b0bd6ce8b6cb266d55a100b27fe723b57735
|
|
| MD5 |
95a092cc10d4a065ac421bfd14fb62ad
|
|
| BLAKE2b-256 |
9d792938726af059987dd5dfbd6475e0c3ef1938189c14207310243ee393fa60
|
File details
Details for the file mjsqltool-1.1.4-py3-none-any.whl.
File metadata
- Download URL: mjsqltool-1.1.4-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d935a1cfcbd8398aeb263a8422a92895d89f655c7ac3032d792cf6861685b3bb
|
|
| MD5 |
be7bb36f7946b9462a81578bb5ef1408
|
|
| BLAKE2b-256 |
e3314658f58d95e78804865891e51153917301dc7c05d462e2918c6fc0656f2f
|