超品集团自用的Python包
Project description
CPpackage
简介
CPpackage是超品集团内部使用的Python包,核心功能集中在MySQL数据库增删改查功能以及部分数据清洗的能力。
安装
pip install CPpackage
使用方法
# 导入包
from CPpackage.db import set_db_config
from CPpackage.db.sql_model import sel_data, update_data, updata, update_datas, del_data, deldata, deldata_time, update_test
# 配置数据库连接(也可通过环境变量CPPACKAGE_DB_*配置)
set_db_config(host='your_host', user='your_user', password='your_password', database='your_database', port=3306)
# 查询示例
rows = sel_data('SELECT 1')
print(rows)
项目结构
CPpackage/
├── CPpackage/ # 主包
│ ├── core/ # 核心功能
│ ├── utils/ # 工具函数
│ └── db/ # 数据库功能与配置(sql_model拆解于此)
├── manage.py # 管理脚本
├── LICENSE # 许可证
├── MANIFEST.in # 打包配置
├── readme.md # 说明文档
└── setup.py # 安装配置
许可证
本项目采用MIT许可证。详情请参阅LICENSE文件。
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
cppackage-0.2.0.tar.gz
(5.9 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 cppackage-0.2.0.tar.gz.
File metadata
- Download URL: cppackage-0.2.0.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9f8c9c29f8a904f59fe122fc289a26f5bfd8ff4f1a24e41ee53db8be7034097
|
|
| MD5 |
bd20b636aeb36aab0936ea0f24964dd2
|
|
| BLAKE2b-256 |
fd310ac39561cc8fff2a1f14bb38b0629ad81023c199b6005ec7b2d622c0cd85
|
File details
Details for the file cppackage-0.2.0-py3-none-any.whl.
File metadata
- Download URL: cppackage-0.2.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4daee19cf08a03394558b62cfb9fece5e2add5391c7f63f515ed771b8f4b5512
|
|
| MD5 |
c46dbb8ca0ef17a2240eee44de2616d3
|
|
| BLAKE2b-256 |
14a372903998527dec7f4ebc2343d67237439e8e45548be5fee0471eaf66e560
|