Skip to main content

常用工具类方法集合

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


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.9.tar.gz (6.0 kB view details)

Uploaded Source

File details

Details for the file wcommon-1.1.9.tar.gz.

File metadata

  • Download URL: wcommon-1.1.9.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.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 wcommon-1.1.9.tar.gz
Algorithm Hash digest
SHA256 fae18947f4c7662b7b06a59fc43c9d0cf28ed6d2862b4251dde6867262956d77
MD5 44b390d5295201306c41b80aa29d1de3
BLAKE2b-256 a61dd344d0e1db82a247b1a87fcb41afca634f0f1dae36d381c80f07ad9f0156

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