SecBatch
A CLI tool to simplify running jobs with encrypted data on a Slurm cluster. This tool automates key generation, data encryption, uploading, Slurm job submission, monitoring, and result retrieval.
Installation
Prerequisites
Before installing, you must have the following command-line tool available in your system's PATH:
- GnuPG (gpg): For encryption and decryption.
You can typically install this using your system's package manager (e.g., apt-get, brew, yum).
Note: Installation under Windows requires different steps described below.
Installing with uv
Once the prerequisites are met, you can install the tool from PyPI using uv:
uv pip install secbatch
This will install the tool and make the secbatch command available in your environment.
Installing with pip
Once the prerequisites are met, you can install secbatch from PyPI using pip in Command Prompt or PowerShell:
pip install secbatch
This will install the tool and its dependencies, making the secbatch command available in your environment.
Usage
After installation, you can use the secbatch command directly, or run it as a module: python -m secbatch.
Full Command Reference
secbatch --host <your-host> <command> [options]
Global Arguments:
--host: The SSH hostname or an alias from your~/.ssh/config.-u, --user: (Optional) Your SSH username. Overrides the user in~/.ssh/config.--ssh-key-file: (Optional) Path to your SSH private key. Overrides theIdentityFilein~/.ssh/config.
Commands:
-
run: Execute the full secure workflow.-i, --input-dir: The local directory containing your input data.-e, --exec: The command to execute on the compute node.-s, --script-file: Path to a local script file to execute.-o, --output-dir: The local directory for results.-n, --job-name: (Optional) A name for the Slurm job.--keep-local-temp: Do not delete the local temporary directory after the workflow completes.-p, --param: (Optional) Additional parameters to pass to sbatch. Can be used multiple times.- ... (and other Slurm parameters like
--nodes,--time, etc.)
-
test-connection: Test the SSH connection to the host. -
test-job: Submit a predefined example job to test the full workflow.
Example: Running a Job
secbatch --host my-cluster run \
-i ./my-data \
-e 'grep "sensitive" input/patient.txt > processed.txt' \
-o ./results
::include{file=TUTORIAL_WINDOWS.md}
Metadata
Release files for secbatch 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| secbatch-1.2.0.tar.gz | 12.4 kB | Without provenance | Details for secbatch-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| secbatch-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for secbatch-1.2.0-py3-none-any.whl |
Total release size: 24.6 kB
Release files / secbatch-1.2.0.tar.gz
| Download URL | secbatch-1.2.0.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4369a36de6bfcaf7ef1b041cf79c28024abe6cc38fd6f511335aa126d27a2e4c
|
|
BLAKE2b-256 checksum How to use checksums |
9791d6e9e5b389ac12b89408a0db9555a7cad8d0df7c45fd48cc8a6bc1bc2790
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Manjaro Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / secbatch-1.2.0-py3-none-any.whl
| Download URL | secbatch-1.2.0-py3-none-any.whl |
|---|---|
| Size | 12.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4a299d0a8e3dc8098ce36f2c4276b6dddb6d1269240d40a0f88c3614d03b1941
|
|
BLAKE2b-256 checksum How to use checksums |
94e7c92d19329c0ada09b491c915b767d2eb8bf6e120ad76b5f0762fa2bbb27e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Manjaro Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for secbatch 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.