pyslurmutils


Namepyslurmutils JSON
Version 0.3.2 PyPI version JSON
download
home_pageNone
SummarySLURM utilities for Python
upload_time2025-01-19 21:31:45
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
license# MIT License **Copyright (c) 2021 European Synchrotron Radiation Facility** Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pyslurmutils

SLURM utilities for scheduling jobs from Python.

The main purpose of this library is to provide a `concurrent.futures.Executor`
implementation for SLURM which can be used on any machine, not necessarily a SLURM client.

```bash
pip install pyslurmutils
```

```python
from pyslurmutils.concurrent.futures import SlurmRestExecutor

with SlurmRestExecutor(
    url=url,                               # SLURM REST URL
    user_name=user_name,                   # SLURM user name
    token=token,                           # SLURM access token
    log_directory="/path/to/log",          # for log files (optional)
    data_directory="/path/to/data",        # TCP communication when not provided
    pre_script="module load ewoks",        # load environment (optional)
    parameters={"time_limit": "02:00:00"}  # SLURM job parameters (optional)
    python_cmd="python",                   # python command (python3 by default)
) as executor:
    future = executor.submit(sum, [1, 1])
    assert future.result() == 2
```

## Documentation

https://pyslurmutils.readthedocs.io/

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pyslurmutils",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "ESRF <dau-pydev@esrf.fr>",
    "download_url": "https://files.pythonhosted.org/packages/2f/0e/f7a0be63af8e671498e0e4d3e5e297ca09b0a3dfad70853e7207e7c4a057/pyslurmutils-0.3.2.tar.gz",
    "platform": null,
    "description": "# pyslurmutils\n\nSLURM utilities for scheduling jobs from Python.\n\nThe main purpose of this library is to provide a `concurrent.futures.Executor`\nimplementation for SLURM which can be used on any machine, not necessarily a SLURM client.\n\n```bash\npip install pyslurmutils\n```\n\n```python\nfrom pyslurmutils.concurrent.futures import SlurmRestExecutor\n\nwith SlurmRestExecutor(\n    url=url,                               # SLURM REST URL\n    user_name=user_name,                   # SLURM user name\n    token=token,                           # SLURM access token\n    log_directory=\"/path/to/log\",          # for log files (optional)\n    data_directory=\"/path/to/data\",        # TCP communication when not provided\n    pre_script=\"module load ewoks\",        # load environment (optional)\n    parameters={\"time_limit\": \"02:00:00\"}  # SLURM job parameters (optional)\n    python_cmd=\"python\",                   # python command (python3 by default)\n) as executor:\n    future = executor.submit(sum, [1, 1])\n    assert future.result() == 2\n```\n\n## Documentation\n\nhttps://pyslurmutils.readthedocs.io/\n",
    "bugtrack_url": null,
    "license": "# MIT License  **Copyright (c) 2021 European Synchrotron Radiation Facility**  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "SLURM utilities for Python",
    "version": "0.3.2",
    "project_urls": {
        "Changelog": "https://gitlab.esrf.fr/workflow/pyslurmutils/-/blob/main/CHANGELOG.md",
        "Documentation": "https://pyslurmutils.readthedocs.io/",
        "Homepage": "https://gitlab.esrf.fr/workflow/pyslurmutils/",
        "Issues": "https://gitlab.esrf.fr/workflow/pyslurmutils/issues",
        "Repository": "https://gitlab.esrf.fr/workflow/pyslurmutils/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2f0ef7a0be63af8e671498e0e4d3e5e297ca09b0a3dfad70853e7207e7c4a057",
                "md5": "0988bd5f1a99d593d2b794e898998196",
                "sha256": "5b7c28ae1efaf2fe40bbe6a7d18bcbf1f216ea0e57c145d402aa07f402be5151"
            },
            "downloads": -1,
            "filename": "pyslurmutils-0.3.2.tar.gz",
            "has_sig": false,
            "md5_digest": "0988bd5f1a99d593d2b794e898998196",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 58378,
            "upload_time": "2025-01-19T21:31:45",
            "upload_time_iso_8601": "2025-01-19T21:31:45.357531Z",
            "url": "https://files.pythonhosted.org/packages/2f/0e/f7a0be63af8e671498e0e4d3e5e297ca09b0a3dfad70853e7207e7c4a057/pyslurmutils-0.3.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-19 21:31:45",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pyslurmutils"
}
        
Elapsed time: 0.37139s