Argparse-subargs

Latest version: v0.9.2

Safety actively analyzes 688126 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.9.1

argparse_subargs

Parse parameter lists in argparse arguments, e.g. --arg sub1 sub2=val ...

- On PyPI: https://pypi.org/project/argparse-subargs/
- On GitHub: https://github.com/v-r-b/argparse_subargs

This module defines:

class SubargParser

Parser for structured sub-arguments of argparse arguments. The subarguments
can be positional arguments or keyword-arguments, e.g.:
myprog.py --print Welcome Message name=Michael role=brother

class SubargAction

Action class to be used with a SubargParser instance. To do so, use arguments
action=SubargAction and subarg_parser=<SubargParser instance> when calling
add_parameter() method of ArgumentParser.

class SubargHelpFormatter

Formatter for help when using action=SubargAction in add_parameter()
of ArgumentParser. Uses SubargHelpFormatterMixin and HelpFormatter
to do the actual work.

class SubargHelpFormatterMixin

Mixin for creating formatter classes for use with ArgumentParser
when SubargHelpFormatter is not suitable. This could, e.g., be

class MyDefaultsFormatter(
SubargHelpFormatterMixin,
argparse.ArgumentDefaultsHelpFormatter)
pass

class PSubarg

Positional subarg description with \_\_eq__ operator.

class KWSubarg

Keyword subarg description with \_\_eq__ operator.

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.