Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
pip3 pip install --user --upgrade git+https://github.com/anguelos/fargv
Fast argument parser
"""
The script's docstring Becomes the general description in the help if defined
"""
from fargv import fargv
params = {
"anInt": 1,
"aFloat": 0.1,
"aBoolean": False,
"anotherBoolean": True,
"aString": "Hello",
"aStringReference": "{aString} World",
"anIntWithHelp": [2,"This would be the help"],
"aChoice": [("choice1","choice2","choice3","choice4"),"And this must be the help"],
"aPositionalSwitch": [set([]), "This is a convenient way to pass colections of things"]
}
new_params, help_str = fargv(params)
my_program -anInt 34 -aFloat=2.3 -aBoolean -anotherBoolean=False
Static autocomplete for any program using fargv can be enabled with a single command.
The following command enables autocomplete for fargv_demo.py in the current shell where it is run.
source <(./examples/fargv_demo.py -bash_autocomplete)
fargv_demo.py should be an executable file employing the shebang (#!/usr/bin/env python3) or something equivalent. For a temporary solution, the autocomplete bash code can go in a script in /etc/bash_completion.d or in .bashrc.
A switch might be a macro for other switches. This allows for example to break many files into a single root switch and all other switches beeing file names relative to that path.
FAQs
A very easy to use argument parser.
We found that fargv 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.