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
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
amhhandler-1.2.2.tar.gz
(4.5 kB
view hashes)
Built Distribution
Close
Hashes for amhhandler-1.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13b4d14398370c2f5333a8188607a5e726023ffcda1a0c7dbf1f746458126ce6 |
|
MD5 | 0543b17ce94ce2b92747b6a0f1ab0b96 |
|
BLAKE2b-256 | e854ca637d9e633fd7543d30700a551868c40c34951c1d72ce6ff43c64abb8e1 |