Skip to main content

A powerful Python 3 command-line parser

Project description

Yet Another Command-Line-Argument Parser

Build Status codecov

I'm tired of working around argparse. This suits my needs a tad better; vaguely inspired by discord.py's brilliant ext.commands framework.

Why?

I needed a way to define sort-of-complex interdependencies between command-line options. None of the packages I found* were able to handle this out of the box to an acceptable degree, so I decided to try my own hand; I feel like the lib should be able to handle this stuff itself, without your needing to delegate roles like "check that these two flags aren't used at the same time as this arg" or "make sure all these things appear together, or alternatively that this second thing does" to external functions or post-parsing if-statements.

*Note: about a month after starting I discovered "RedCLAP", which did beat Joffrey to the idea of AND/OR/XOR clumps (by the names of "requires", "wants", and "conflicts"), albeit with a very different design philosophy overall; credit's due for (AFAIK) originating that concept, however! I also at about the same time found argh, which despite not solving the clumping issue appears to (by pure coincidence) share a number of features with Joffrey -- but it's currently looking for maintainers and does depend on argparse underneath (which I'm trying my best to get away from), so I'd say we're good.

Joffrey, by the way, is still an experiment. If it really doesn't solve the same problem for you that it does for me, I think you'd be better off trying something else -- here's a list of alternatives to check out!

The name

Parsley, for parsing, is called جعفری /d͡ʒæʔfæˈɾi/ in Farsi. That glottal stop is elided into a vowel in Iran, giving /d͡ʒæːfæˈɾi/, and if you squint hard enough that resembles a heavily accented pronunciation of "Joffrey".

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

joffrey-0.5.2.tar.gz (27.9 kB view hashes)

Uploaded Source

Built Distribution

joffrey-0.5.2-py3-none-any.whl (73.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page