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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file joffrey-0.5.2.tar.gz.

File metadata

  • Download URL: joffrey-0.5.2.tar.gz
  • Upload date:
  • Size: 27.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.34.0 CPython/3.7.4

File hashes

Hashes for joffrey-0.5.2.tar.gz
Algorithm Hash digest
SHA256 6ec29ac8bd87b59d70d064df6bde2ffdab70efb06af6788be2163aa9913236ac
MD5 730243768aeb29e0edb1aa81ece81b36
BLAKE2b-256 c6f67e1fd7fa6f8512408a9c2519f3996e8c6643316cec0541231f52db2cf452

See more details on using hashes here.

File details

Details for the file joffrey-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: joffrey-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 73.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.34.0 CPython/3.7.4

File hashes

Hashes for joffrey-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 884136ba4ae2c69f91b6c30d811b2d41474ebcff333b5eca311d2658b7174aae
MD5 ff4170500168b3c06f3bf1c9ae8e1f18
BLAKE2b-256 2981bd92ab4d92d4020613c5d50735274d28455396792e5456ceea5e5c6536b2

See more details on using hashes here.

Supported by

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