# DistLRE (dist-el-ar-ee)
A lightweight Python package to distribute commands on remote hosts via SSH and to execute them locally in parallel.
Supports running a local commands:
```python
from distlre.distlre import DistLRE, Task, RemoteHost
executor = DistLRE(local_threads=1)
task = Task(command='ls ~', meta='META', time_limit=10, memory_limit=10)
future = executor.submit(task)
executor.execute_tasks()
executor.wait()
print(future.result().output)
```
Or runs command on a remote host:
```python
import getpass
password = getpass.getpass("Password to connect to [localhost]:")
executor = DistLRE(remote_hosts=[RemoteHost('localhost', port=31415, password=password)])
task = Task(command='ls ~', meta='META', time_limit=10, memory_limit=10)
other_task = Task(command='cd ~', meta='META', time_limit=10, memory_limit=10)
future = executor.submit(task)
other_future = executor.submit(other_task)
executor.execute_tasks()
executor.wait()
print(future.result().output)
```
# Install
`pip3 install DistLRE`
A lightweight Python package to distribute commands on remote hosts via SSH and to execute them locally in parallel.
Supports running a local commands:
```python
from distlre.distlre import DistLRE, Task, RemoteHost
executor = DistLRE(local_threads=1)
task = Task(command='ls ~', meta='META', time_limit=10, memory_limit=10)
future = executor.submit(task)
executor.execute_tasks()
executor.wait()
print(future.result().output)
```
Or runs command on a remote host:
```python
import getpass
password = getpass.getpass("Password to connect to [localhost]:")
executor = DistLRE(remote_hosts=[RemoteHost('localhost', port=31415, password=password)])
task = Task(command='ls ~', meta='META', time_limit=10, memory_limit=10)
other_task = Task(command='cd ~', meta='META', time_limit=10, memory_limit=10)
future = executor.submit(task)
other_future = executor.submit(other_task)
executor.execute_tasks()
executor.wait()
print(future.result().output)
```
# Install
`pip3 install DistLRE`
Metadata
Release files for distlre 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| distlre-0.0.4.tar.gz | 2.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| distlre-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.6 kB
Release files / distlre-0.0.4.tar.gz
| Download URL | distlre-0.0.4.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
74f8d85e85e3d806cf62bf5dd0a58d55acb14fb17dcc3919120693d1ebf9b49e
|
|
BLAKE2b-256 checksum How to use checksums |
1d51d543028938370b6cbbbfd054dbe7ba4a7286afd8041e2c408ec55f0264ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.23.0 CPython/3.6.0
|
Release files / distlre-0.0.4-py3-none-any.whl
| Download URL | distlre-0.0.4-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9ab51017a892fc824c4b89dfa808187f179c61b0ffb511f4e9bb556e90dea877
|
|
BLAKE2b-256 checksum How to use checksums |
29275fde69d0f32b1eec1c40799f5d864e2cf9853bc6cf54c8163e8e23913c4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.23.0 CPython/3.6.0
|