Skip to main content

some useful bash tools write in python

Project description

SHTools - some useful bash tools write in pure python.

image image

About

纯Python实现的一些bash命令工具集合.

Requirements

  • Python3

Install

通过pip命令安装:

pip install shtools

或者通过下载源码包或clone代码至本地,然后通过如下命令安装:

python setup.py install

Module

  • curl: transfer a URL
  • mongo: mongodb cli
  • mysql: mysql cli
  • nc: concatenate and redirect sockets
  • ntpdate: set the date and time via NTP
  • ping: send ICMP ECHO_REQUEST to network hosts
  • psql: postgresql cli
  • rediscli: redis cli
  • scp: secure copy (remote file copy program)
  • sh: shell
  • ssh: OpenSSH SSH client (remote login program)

Example

from shtools.bash.mysql import Mysql
cmd = Mysql('-h 127.0.0.1 -P 3306 -u root -p ****** -D database -e "SELECT * FROM table"')
cmd.run()

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

shtools-1.0.10.zip (23.2 kB view hashes)

Uploaded Source

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