Catalog PyPI
PACKAGE EXPLORERView in registry

aceparse

PyPI

Improved argparse.ArgumentParser that works with dataclasses

Versions collected1
Direct dependencies5From release 0.2.2
Last observed20 Oct, 18:09 UTC

README

Version 0.2.2 documentation

aceparse

An argument parser that wraps python's built-in argparse, allowing it to parse command lines into dataclasses.

Advantages over argparse:

  • you get a dataclass so you can use an IDE to find out where your command line options are used
  • nicer specification of default values
  • can be combined with pydantic dataclasses to type check arguments

Examples

from dataclasses import dataclass
from aceparse import AceParser, AceArg

@dataclass
class Arguments:
    hello: str = AceArg(help="Name of thing to say hello to")

a = AceParser(Arguments)
args = a.parse_args_into_dataclasses(["--hello=name"])

print(f"Hello {args.hello}")

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.2.28 Jul 20255

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 18:09 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:58ae2d3bdc6a1afa3b357ab15c9a03ed7af8b4cdbe9e185fa016859065f3b0bc