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 details)

Uploaded Source

File details

Details for the file shtools-1.0.10.zip.

File metadata

  • Download URL: shtools-1.0.10.zip
  • Upload date:
  • Size: 23.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for shtools-1.0.10.zip
Algorithm Hash digest
SHA256 278701e7ac2a0ad58441fac652e62e542692e33652ec0a3ee52b71f6711cfeec
MD5 96605141418d2a36ade73847bef60d05
BLAKE2b-256 7f11c8e5aef49cfc537368be53387158eaf025d3a28bee8e9210f6e08c479056

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page