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.0.tar.gz
(4.6 kB
view hashes)
Built Distribution
Close
Hashes for AmhHandler-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db09fa57368fc9ac1e47d02b0b93050eccddd709d5b412692d948d841afe2667 |
|
MD5 | 5bf8f5c7611478db64d4eb4b5141e1bd |
|
BLAKE2b-256 | 1b1b241db17f1844929ad73011eb326e7c322744f3dea37209c3a97673318491 |