Skip to main content

qaviton ssh

Project description

Qaviton SSH

logo
version open issues downloads code size

making ssh super easy

Installation

pip install --upgrade qaviton_ssh

Requirements

  • Python 3.6+

Features

  • simple ssh send-recieve api ✓
  • async requests ✗ (coming soon)
  • multi-session workflow ✗ (coming soon)

Usage

creating an ssh client

from qaviton_ssh import SSH
# hostname is a reachable address for the machine
# username is the allowed user to have ssh access
# private_key is the file path or string of the private key
client = SSH(hostname='x.x.x.x', username='username', private_key='pkey.pem')

response = client.send('echo "hello world"')  # server will respond with b"hello world"
print(response.data, response.error)

cd = 'cd myproject'
file = 'script.py'
response = client.send_many([cd, f'touch {file}'])
assert not response.error

response = client.send_many([cd,
    f'echo "print(\"script success\")" > {file}'
    f'python {file}'])

assert not response.error
print(response.data)  # server will respond with b"script success"

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

qaviton_ssh-2019.9.26.18.2.32.974238.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qaviton_ssh-2019.9.26.18.2.32.974238-py2.py3-none-any.whl (7.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file qaviton_ssh-2019.9.26.18.2.32.974238.tar.gz.

File metadata

  • Download URL: qaviton_ssh-2019.9.26.18.2.32.974238.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.7

File hashes

Hashes for qaviton_ssh-2019.9.26.18.2.32.974238.tar.gz
Algorithm Hash digest
SHA256 f2b52a227aad6e99126befd6ec29b00511c561d610d91f99f1922ad022d7a272
MD5 ac60ae4e4ccfc33265e39c2018875cd1
BLAKE2b-256 2cc4334786235305a7df56da69a56a408a99ffac6a23ec69028c8c7f8fd6887d

See more details on using hashes here.

File details

Details for the file qaviton_ssh-2019.9.26.18.2.32.974238-py2.py3-none-any.whl.

File metadata

  • Download URL: qaviton_ssh-2019.9.26.18.2.32.974238-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.7

File hashes

Hashes for qaviton_ssh-2019.9.26.18.2.32.974238-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7019bc32980a1dfad963e5b0e5532409d14c73a10cd8189674c09c9602514b56
MD5 0df972f534490d3b6bab7c1cfed4727e
BLAKE2b-256 0d6bf065df4d16dc44133a3962519906a01fa38c85a801d33c72abf04f1b6172

See more details on using hashes here.

Supported by

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