Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Pure Python Chirp client for HTCondor
The latest release is available on PyPI:
pip install htchirp
However, if HTCondor job sandbox space is a premium, most of HTChirp's
functionality can be accessed from htchirp.py
as a standalone script or module.
There are multiple ways to invoke HTChirp inside a HTCondor job environment.
First, you can use an HTChirp object as part of a larger Python workflow connect to the Chirp server and issue commands:
Using context management (recommended):
>>> import htchirp
>>> with htchirp.HTChirp() as chirp:
>>> chirp.ulog('Logging use of Chirp in Python')
>>> me = chirp.whoami()
>>> chirp.set_job_attr('UsingPythonChirp', 'True')
>>> using_chirp = chirp.get_job_attr('UsingPythonChirp')
>>> me
'CONDOR'
>>> using_chirp
'true'
Using manual connection and disconnection (not recommended):
>>> import htchirp
>>> chirp = htchirp.HTChirp()
>>> chirp.connect()
>>> chirp.write('Important output 1\n', '/tmp/my-job-output', 'cwa')
19
>>> chirp.write('Important output 2\n', '/tmp/my-job-output', 'cwa')
19
>>> chirp.read('/tmp/my-job-output', 1024)
'Important output 1\nImportant output 2\n'
>>> chirp.fetch('/tmp/my-job-output', './my-job-output')
38
>>> chirp.disconnect()
For more information on the available commands, see help(htchirp.HTChirp)
.
Second, you can use HTChirp on the command line with the same commands
and arguments supported by the
condor_chirp
utility, either by including
htchirp.py
with your job or by installing the HTChirp package inside a
virtual environment inside your job.
Using htchirp.py
from within the working directory:
$ python htchirp.py ulog "Logging use of Chirp in Python"
$ python htchirp.py whoami
CONDOR
$ python htchirp.py set_job_attr UsingPythonChirp True
$ python htchirp.py get_job_attr UsingPythonChirp
True
Using condor_htchirp
after installing HTChirp in an active virtual
environment:
$ condor_htchirp ulog "Logging use of Chirp in Python"
$ condor_htchirp whoami
CONDOR
$ condor_htchirp set_job_attr UsingPythonChirp True
$ condor_htchirp get_job_attr UsingPythonChirp
True
Using python -m htchirp
after installing HTChirp in an active
virtual environment:
$ python -m htchirp ulog "Logging use of Chirp in Python"
$ python -m htchirp whoami
CONDOR
$ python -m htchirp set_job_attr UsingPythonChirp True
$ python -m htchirp get_job_attr UsingPythonChirp
True
For a list of commands and arguments, pass --help
to your preferred
command line invokation, or see the
condor_chirp
man page.
FAQs
Pure Python Chirp client for HTCondor
We found that htchirp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.