Skip to main content

some useful bash tools write in python

Project description

SHTools - some useful bash tools write in pure python.

image image image

About

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

Requirements

  • Python3

Install

通过pip命令安装:

pip install shtools[ssh]

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

python setup.py install

cli command

  • 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)
  • bash: local shell command
  • ssh: OpenSSH SSH client (remote login program)

Example

from shtools.bash.mysql import mysql

# print help
mysql.print_help()

# run
with mysql('-h 127.0.0.1 -P 3306 -u root -p ****** -D database') as client:
    result = client.execute("SELECT * FROM table")

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-2.2.1.zip (32.9 kB view details)

Uploaded Source

File details

Details for the file shtools-2.2.1.zip.

File metadata

  • Download URL: shtools-2.2.1.zip
  • Upload date:
  • Size: 32.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.5

File hashes

Hashes for shtools-2.2.1.zip
Algorithm Hash digest
SHA256 6e2937dd844b3ff4101b4fb96e08b8e3a79ce4769a8fedc8bd12ab95828f36f1
MD5 6f906dbc384dc4f971a97a5a4e62d54b
BLAKE2b-256 f216d05e398ddf6cd6db8a15aca43f7dda8410b37f1e45574d619a906f163b7e

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