Skip to main content

A Python package to distribute commands on remote hosts viaSSH and to execute them locally in parallel.

Project description

# 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`


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

distlre-0.0.4.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

distlre-0.0.4-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file distlre-0.0.4.tar.gz.

File metadata

  • Download URL: distlre-0.0.4.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for distlre-0.0.4.tar.gz
Algorithm Hash digest
SHA256 74f8d85e85e3d806cf62bf5dd0a58d55acb14fb17dcc3919120693d1ebf9b49e
MD5 3a9f86a77d36e0c427b583654ebf8292
BLAKE2b-256 1d51d543028938370b6cbbbfd054dbe7ba4a7286afd8041e2c408ec55f0264ef

See more details on using hashes here.

Provenance

File details

Details for the file distlre-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: distlre-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for distlre-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9ab51017a892fc824c4b89dfa808187f179c61b0ffb511f4e9bb556e90dea877
MD5 d68a1d6770bd2a9c48388a9ef7544495
BLAKE2b-256 29275fde69d0f32b1eec1c40799f5d864e2cf9853bc6cf54c8163e8e23913c4a

See more details on using hashes here.

Provenance

Supported by

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