
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
scriptflow
Advanced tools
Small library that allows scheduling scripts asyncrhonously on different platforms. Think of it as a Make when you can write the dependencies as python code, and that can run locally, on an HPC or in the cloud (cloud is not implemented just yet).
The status is very experimental. I will likely be changing the interface as I go.
shlex to parse command from stringsCreate a file sflow.py with:
import scriptflow as sf
# set main options
sf.init({
"executors":{
"local": {
"maxsize" : 5
}
},
'debug':True
})
# example of a simple step that combines outcomes
def step2_combine_file():
with open('test_1.txt') as f:
a = int(f.readlines()[0])
with open('test_2.txt') as f:
b = int(f.readlines()[0])
with open('final.txt','w') as f:
f.write("{}\n".format(a+b))
# define a flow called sleepit
async def flow_sleepit():
i=1
task1 = sf.Task(
cmd = f"""python -c "import time; time.sleep(5); open('test_{i}.txt','w').write('5');" """,
outputs = f"test_{i}.txt",
name = f"solve-{i}")
i=2
task2 = sf.Task(
cmd = f"""python -c "import time; time.sleep(5); open('test_{i}.txt','w').write('5');" """,
outputs = f"test_{i}.txt",
name = f"solve-{i}")
await sf.bag(task1,task2)
task_final = sf.Task(
cmd = "python -c 'import sflow; sflow.step2_combine_file()'",
outputs = f"final.txt",
inputs = [*task1.get_outputs(),*task2.get_outputs()])
await task_final
then create a local env, activate, install and run!
python3 -m venv env
source env/bin/activate
pip install scriptflow
scriptflow run sleepit
start() method, or it will be sent automatically when awaited.sf.bag(...).I have tried to use the following three alternatives which are all truly excelent!
There were use cases that I could not implement cleanly in the dataflow model of nextflow. I didn't like that snakemake relied on file names to trigger rules, I was constently juggling complicated file names. Pydoit is really great, but I couldn't find how to extend it to build my own executor, and I always found myself confused writing new tasks and dealing with dependencies.
the package is managed using poetry, install poetry first then
poetry install
# run example
cd examples/simple-local
poetry run scriptflow run sleepit
# run tests with coverate
poetry run python -m pytest --cov=scriptflow
poetry run coverage xml
poetry run codecov -t <token>
FAQs
Like a makefile but in python, a stripped-down system of Airflow or Luigi
We found that scriptflow 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.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.