Metadata-Version: 2.3
Name: pyrussh
Version: 0.1.0
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
License-File: LICENSE
License-File: LICENSE-APACHE
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# pyssh
Python bindings for libssh2 on top of rust-ssh2

## motivations
* learn pyo3
* I need a high-concurrency SSH connection pool

## Features
* create a ssh session
* exec command by session
* download/upload file

## Install & Test
developing mode:
```shell
git clone https://github.com/xiaoniaoyouhuajiang/pyssh.git
cd pyssh
maturin develop
```

bench test paramiko & pyssh 
```shell
# after installing pyssh
python benchmakrs/benchmarks.py --host <your host> --port <port> --username <..> --password <..> 
```

## Usage
### benchmark
Enter the `benchmakrs` directory and execute the corresponding Python file to compare the performance of pyssh and Paramiko.
* ~~authentication~~
* execution
* ~~upload file~~
* read remote file

### result
test on my pc:
|time/s|paramiko|pyssh|
|--|--|--|
|authentication|0.316176|0.077625|
|upload file|0.825472|0.632277|

## Todo
* ~~get exit code for `run_command`~~
* ~~download/upload file~~
* high level api for ssh connection
    * batch running a single command
    * batch running command


