I am sick of writing argparse boilerplate code, so I made "duckargs" to do it for me

This page summarizes the projects mentioned and recommended in the original post on /r/Python

Our great sponsors
  • Sonar - Write Clean Python Code. Always.
  • InfluxDB - Access the most powerful time series database as a service
  • SaaSHub - Software Alternatives and Reviews
  • Python Fire

    Python Fire is a library for automatically generating command line interfaces (CLIs) from absolutely any Python object.

    Have you checked out fire? Personally, I think it's a really elegant solution to turning a callable object into command line. Plus, the chaining function calls feature lets you build some pretty complex command line patterns likes you never seen with other frameworks. Definitely worth giving it a try!

  • SimpleParsing

    Simple, Elegant, Typed Argument Parsing with argparse

    I personally like https://github.com/lebrice/SimpleParsing and similar (there are a few similar libraries with the same concept)

  • Sonar

    Write Clean Python Code. Always.. Sonar helps you commit clean code every time. With over 225 unique rules to find Python bugs, code smells & vulnerabilities, Sonar finds the issues while you focus on the work.

  • docopt

    Pythonic command line arguments parser, that will make you smile

    I like http://docopt.org/ a lot. You seem like someone who might have opinions on that.

  • typer

    Typer, build great CLIs. Easy to code. Based on Python type hints.

    Very cool. I’ve been using Typer lately. Easy to give a library a cli without too much boilerplate.

  • datargs

    Declarative, type-safe command line argument parsers from dataclasses and attrs classes

    I made datargs for the same reason: ``` from dataclasses import dataclass from pathlib import Path from datargs import parse

  • click

    Python composable command line interface toolkit

    Hmm… did you try such approaches, as [click](https://github.com/pallets/click) or[tap](https://github.com/swansonk14/typed-argument-parser)?

  • typed-argument-parser

    Typed argument parser for Python

    Hmm… did you try such approaches, as [click](https://github.com/pallets/click) or[tap](https://github.com/swansonk14/typed-argument-parser)?

  • InfluxDB

    Access the most powerful time series database as a service. Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.

  • sourcepy

    Sourcepy lets you source python scripts natively inside your shell

    Sourcepy also offers a radically different approach for this. Just put some functions into a Python file and source it. A big magic for building production apps but pretty cool for turning functions into CLI commands without any special code.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts