ScriptGrabber
ScriptGrabber is a Python script that implements a simple polling mechanism to grab python scripts from a source system and execute it. The script is designed to be run as a standalone process and can be controlled using Unix signals.
Getting started
- Clone the repository:
git clone https://github.com/meirm/script_grabber.git
cd script_grabber
- Install the requirements:
pip install -r requirements.txt
- Poetry build and install:
poetry build
poetry install
You might need to change the clusterpath variable to point to the location of your data cluster, or change the poll_interval variable to control how often the script should poll for data.
- Run the script:
python grabber.py
The script will start polling for data and writing it to a file in the data directory.
Usage
ScriptGrabber uses a simple polling mechanism to grab data from a source system. The main logic of the script is contained in the run method, which is called by the init method when an instance of the ScriptGrabber class is created.
By default, the script polls for data every second and writes it to a file in the data directory. You can customize the polling interval by changing the poll_interval variable in the init method.
ScriptGrabber also supports several Unix signals that can be used to control its behavior. Here are the supported signals:
SIGTERM: stops the script, renames the jobs to "interrupted", and exits
SIGUSR1: dumps the current status of the script
SIGUSR2: pauses or resumes the polling loop
To send a signal to a running instance of ScriptGrabber, use the kill command with the PID of the Python process that's running the script. For example, to send a SIGTERM signal to a ScriptGrabber instance with PID 1234, run:
kill -SIGTERM 1234
License
ScriptGrabber is released under the MIT License. See LICENSE for details.
Metadata
Release files for script-grabber 0.1.4
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 |
|---|---|---|---|---|
| script_grabber-0.1.4.tar.gz | 5.7 kB | Without provenance | Details for script_grabber-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| script_grabber-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for script_grabber-0.1.4-py3-none-any.whl |
Total release size: 13.9 kB
Release files / script_grabber-0.1.4.tar.gz
| Download URL | script_grabber-0.1.4.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d0efc85d011328f563ee2775a3c343f7683208b2a9bf381c7a078fdb67a86271
|
|
BLAKE2b-256 checksum How to use checksums |
194afc1aedd17a8ea2951e162fed40299ad4f1f316e45fcb795a02c23da93165
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.11.9 Darwin/24.0.0
|
Release files / script_grabber-0.1.4-py3-none-any.whl
| Download URL | script_grabber-0.1.4-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a29db2e39ff8bb9795e557bc6d5dc991721155dae739cbbcc1b1e86229e29f18
|
|
BLAKE2b-256 checksum How to use checksums |
270269dad1dc7b4165ad3c5f4a74519e631bdf145d2008774c5efd27e329e19d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.11.9 Darwin/24.0.0
|
Security for script-grabber 0.1.4
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.