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.

Files for shtools, version 1.0.10
Filename, size File type Python version Upload date Hashes
Filename, size shtools-1.0.10.zip (23.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page