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.1.tar.gz
(4.6 kB
view hashes)
Built Distribution
Close
Hashes for amhhandler-1.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83c00d552db7ff2ec1bb9322cb96e5221bf9420589027805c5399cc56c5c0e11 |
|
MD5 | 8c089e7fe5f670b450f94a3bf90098a1 |
|
BLAKE2b-256 | 5194b945238980ee60243e2ac4a334aa075784920898c57a5e467c8130e08c00 |