常用工具类方法集合
Project description
This is my common Python tool classes.
/data/apps/public/conf.ini content like:
[mysql]
host=example.com
port=3306
user=username
passwd=password
database=test
charset=utf8mb4
Find the localhost internal network ip:
from wcommon import *
ip = getLocalIp()
hostname = getLocalHostname()
Operate mysql data:
mysql = Mysql(configuraion_file="/data/apps/public/conf.ini", section="mysql")
#query
rows = mysql.query("select * from example_table where status = %s order by id desc limit %s",(1,10))
for row in rows:
print(row)
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
wcommon-1.1.8.tar.gz
(5.3 kB
view details)
File details
Details for the file wcommon-1.1.8.tar.gz.
File metadata
- Download URL: wcommon-1.1.8.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.46.0 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e90afed0da6d9f7390033564ef456022750bc1dc3307bd84aaa45d9dc60d5e41
|
|
| MD5 |
bfa02896900a0c6fb8401b758ddd2700
|
|
| BLAKE2b-256 |
d01ce19e7181c2f7241b6633de6d585b24f486ba0835bca245330ca883ace02b
|