Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Flagparse is a library for building modular command-line interfaces with accent on nested commands. This library removes the pain of manually constructing the argument parsing and applying handler for each command, all of this is done by this tiny library.
pip install flagparse
Please see the wiki for basic usage and other documentation of using flagparse.
Here is an example of a simple Flagparse app:
import flagparse
class Sum(flagparse.SubCommand):
"""Sub-command to handle numbers summation."""
name = "sum"
arguments = [
(["integers"],
dict(metavar="INT",
type=int,
nargs="+",
help="integers to be summed")),
]
def handle(self, args: flagparse.Namespace) -> None:
print(sum(args.integers))
class Calc(flagparse.Command):
"""A simple calculator that sums numbers."""
name = "calc"
if __name__ == "__main__":
Calc(subcommands=[Sum]).parse()
How it looks when run:
$ python main.py sum 1 2 3
6
The openflow library is distributed under MIT license, therefore you are free to do with code whatever you want. See the LICENSE file for full license text.
FAQs
flagparse is library to build command-line interfaces
We found that flagparse 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.