Skip to main content

chibi_argsparser

https://img.shields.io/pypi/v/chibi_argsparser.svg Documentation Status

wrapper for ArgumentParser to make more human the definition of the parser

Chibi_argparser vs ArgumentParser

Chibi_argparser

from chibi_argsparser import Chibi_args

parser = Chibi_args( "small example for ArgumentParser" )
parser.log_level.params = [ '--log_level' ]
parser.log_level.help = "level of logger"
parser.log_level.default = "INFO"

parser.command.set_as_subparser()
parser.command.help = "sub-comamnd help"

parser.command.list.help = "list the backups"
parser.command.backup.help = "do a backups"

parser.command.backup.block.params = [ "-b", '--block' ]
parser.command.backup.block.help = "block"
parser.command.backup.block.kind = Chibi_path
parser.command.backup.block.required = True

parser.command.profile.set_as_subparser()
parser.command.profile.dest = "profile_command"

parser.command.profile.backup
parser.command.profile.list
parser.command.profile.restore

ArgumentParser

from chibi_argsparser import Chibi_args
from argparse import ArgumentParser

parser_argparser = argparse.ArgumentParser(
        description="small example for ArgumentParser" )

parser_argparser.add_argument(
        "--log_level", dest="log_level", default="INFO",
        help="level of logger", )

sub_parsers = parser.add_subparsers(
        dest='command', help='sub-command help' )
parser_list = sub_parsers.add_parser( 'list', help='list the backups', )
parser_backup = sub_parsers.add_parser( 'backup', help='do a backup', )

parser_backup.add_argument(
        '--block', '-b', required=True, type=Chibi_path, help='block' )

profile_parser = sub_parsers.add_subparsers(
        dest='profile_command', help='', )

profile_parser.add_argument(
        '--block', '-b', required=True, type=Chibi_path, help='block' )

parser_backup = sub_parsers.add_parser( 'backup', )
parser_list = sub_parsers.add_parser( 'list', )
parser_list = sub_parsers.add_parser( 'restore', )

results

from chibi_argsparser import Chibi_args
from argparse import ArgumentParser

params = [
        "profile", '--block', '/dev/sda', 'backup', '--other', '--home' ]

# parser Chibi_args
result = parser( params )
# parse ArgumentParser
result_argparser = parser_arg_parser.parse_args( params )

assert result.command.list == False
assert result.command.profile == True
assert result.command.backup == False

assert result_2.command == "profile"
assert result.log_level == result_2.log_level
assert result.block == result_2.block

assert result.profile_command.list == False
assert result.profile_command.restore == False
assert result.profile_command.backup == True
assert result_2.profile_command == "backup"

assert result.home == result_2.home
assert result.other == result_2.other

assert result == {
        'block': '/dev/sda',
        'command': {'backup': False, 'list': False, 'profile': True},
        'home': True,
        'log_level': 'INFO',
        'other': False,
        'profile_command': {'backup': True, 'list': False, 'restore': False}
}

assert result_argparser == {
        'block': '/dev/sda',
        'command': 'profile',
        'home': True,
        'log_level': 'INFO',
        'other': False,
        'profile_command': 'backup'
}

History

1.2.0 ( 2026-05-15 )

  • se agrego nargs a los argumentos

1.1.1 ( 2026-04-26 )

  • se agrego el parametro de –log_level al parser en common

1.1.0 ( 2026-03-28 )

  • se agrego la clase common en los chibi args con el argumento de log_level

1.0.1 ( 2026-03-27 )

  • se agrega dependencia chibi_atlas a setup.py

1.0.0 ( 2026-03-27 )

  • se agrega clase Chibi_args y Chibi_arguments ambos siendo hijos de chibi_atlas

  • se agrego ejemplo de compatibilidad con ArgumentParser en readme

  • prueba unitaria de compatibilidad

0.0.1 ( 2026-03-26 )

  • First release on PyPI.

Metadata

Release files for chibi-argsparser 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chibi-argsparser 1.2.0
File Size Uploaded Provenance
chibi_argsparser-1.2.0.tar.gz 10.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for chibi-argsparser 1.2.0
File Interpreter ABI Platform
chibi_argsparser-1.2.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 17.2 kB

Release files / chibi_argsparser-1.2.0.tar.gz

Download URL chibi_argsparser-1.2.0.tar.gz
Size 10.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e0a2fe0ec2a2a8e2b9e38e1d9657e293e92c0fa1617fb07bacf8ffddc8eccb9b
BLAKE2b-256 checksum
How to use checksums
e5158084c8c2da2b774f34bb9ae7a1b4cf90f0bad4462dacd9da343fb118fe1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / chibi_argsparser-1.2.0-py2.py3-none-any.whl

Download URL chibi_argsparser-1.2.0-py2.py3-none-any.whl
Size 6.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
43e6ff81478090d48b4fef8fac7e397b57ba9056409274d6b8dda12e67445790
BLAKE2b-256 checksum
How to use checksums
82b373056ac894619b3829cd4cda162a6cd6af4b5201d3f15ad6d92465cf6c37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Security for chibi-argsparser 1.2.0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page