Skip to main content

An even better way to work with Python.

Project description

shell

from amhhandler import shell


cmd = "ls /tmp"
result, rcode = shell.run(cmd)
if rcode == 0:
    print(result)
else:
    print('execute error: {0}'.format(result))

mysql

from amhhandler import mysql


dbconfig = {"host":"127.0.0.1","port":3306, "user":"admin", "password":"123456", "db":"mysql"}

dbHandler = mysql.Conn(**dbconfig)
sql = "select * from mysql.user where user='admin';"
result = dbHandler.select(sql)

ding ding robot

logging

log = logger.log2file('/tmp/run.log')
log.info('execute log')

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

AmhHandler-1.2.0.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

AmhHandler-1.2.0-py3-none-any.whl (5.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page