Skip to main content

Pip package to interact with the eAE-interface

Project description

# eAE for python
Python pip package to interact with the eAE.

# Install

eAE has two pre-requisites: requests and requests_toolbelt.
The simplest way to install eAE is to use the **Py**thon **P**ackage **I**ndex (PyPI):

```bash
# For a first installation
pip install eAE

# For upgrading to the latest release
pip install --upgrade eAE
```

## *Example of an eAE script to submit a job*

```python
# We import the eAE package
from eAE import eAE

directory = ''

# We create the connection to the backend
eae = eAE.eAE("admin", "admin", "127.0.0.1")

# We list the jobs with their associated parameters
parameters = ["first_analysis_type 0 1"]

# We list the required files for the analysis to be sent to the back-end
data_files = ["job.py", "faust.txt"]

# We submit a job
answer = eae.submit_jobs("python2", "job.py", parameters, data_files)

# We check that the submission has been successful
print(answer)

"""
answer = { "status": "OK",
"jobID": "5c47530c6ad68800121c72be",
"jobPosition": 1,
"carriers": [
"carrier:3000"
]
}
"""

# We check the current status of the job
status = eae.get_job(answer['jobID'])

print(status)

"""
status = {
'status': ['eae_job_completed', 'eae_job_done', 'eae_job_running', 'eae_job_scheduled', 'eae_job_queued', 'eae_job_transferring_data', 'eae_job_created'],
'startDate': '2018-01-22T17:29:53.983Z',
'main': 'job.py',
'endDate': '2018-01-22T17:30:14.077Z',
'executorPort': '9000',
'executorIP': '127.0.0.1',
'stdout': 'Hello World !\n',
'output': ['test_out.txt'],
'params': ['first_analysis_type 0 1'],
'statusLock': False,
'stderr': '',
'requester': 'admin',
'swiftData': {},
'input': ['job.py', 'faust.txt'],
'message': {'context': 'success'},
'_id': '5c47530c6ad68800121c72be',
'type': 'python2',
'exitCode': 0
}
"""

# We download the results
result = eae.get_job_result(directory, answer['jobID'])

# We have a look at the computed result
"""
Hello World !
first_analysis_type
The Project Gutenberg EBook of Faust, by Johann Wolfgang Von Goethe

This eBook is for the use of anyone anywhere at no cost and with
almost no restrictions whatsoever. You may copy it, give it away or
re-use it under the terms of the Project Gutenberg License included
with this eBook or online at www.gutenberg.net
"""
"""
```


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

eae-0.1.3.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

eae-0.1.3-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file eae-0.1.3.tar.gz.

File metadata

  • Download URL: eae-0.1.3.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.7

File hashes

Hashes for eae-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f4d51ec180021c3eaf3c2de6d5ffefa3f2a55bdff088aa9c0ad78d09a01f8729
MD5 ccd1114b9953e7e48b2a70b376d1f568
BLAKE2b-256 fe95f79f53872ac74b88e6a0b5760f949e48ca92cf0028d8e777a942771b0aa4

See more details on using hashes here.

File details

Details for the file eae-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: eae-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.7

File hashes

Hashes for eae-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2809f8408da5cc78ff00dfc567b2b414c8410250af1686d1b2d0288315b66850
MD5 91709535fbe936b17bd83a1714d9e5ac
BLAKE2b-256 53f3cd7cd41e1a4df14218e44070c0a28d45ff2bfadbc91d1df79c1524d676fc

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