Skip to main content

常用工具类方法集合

Project description

This is my common Python tool classes.

Find the localhost internal network ip:

from wcommon import *
ip = getLocalIp()
hostname = getLocalHostname()

mysql = Mysql(section="mysql")

Operate mysql data:

mysql = Mysql(configuraion_file="/data/apps/public/conf.ini", section="mysql")

#query
rows = mysql.query("select * from example 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.6.tar.gz (4.7 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: wcommon-1.1.6.tar.gz
  • Upload date:
  • Size: 4.7 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

Hashes for wcommon-1.1.6.tar.gz
Algorithm Hash digest
SHA256 7464cf331fa9b2ebf23c87203b6e57a1a5a3cfaa73983aa1248cbaebb83e6920
MD5 06317c3309d36b615ae174d9715a55e0
BLAKE2b-256 27f4befde13a235cbb2ed999b8e81ab508a6bf67927203638c27bf3eece355ef

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