Skip to main content

Truly pythonic argument parser.

Project description

No Argparse Any More.

Don’t google argparse just take some NAAM

  • I forget how to use argparse every time I make utilities

  • 10+ lines for just parsing arguments? No way!

  • There should be a super pythonic way to parse arguments!!!!

  • I love Kizuna Ai.


pip install naam

How to use it

Just decorate your main function like @naam.bind_args and execute it!


Here’s a code (placed in examples/

from naam import bind_args

def hello(first_name, last_name=None):
    msg = 'Hello world! My name is %s.'
    if last_name is None:
        print(msg % first_name)
        print(msg % '{} {}'.format(first_name, last_name))


With empty arguments, this outputs:

Usage: [-l LAST_NAME | --last_name LAST_NAME] FIRST_NAME

With arguments, this outputs like:

$ python Miku
Hello world! My name is Miku.

$ python Miku --last_name Hatsune
Hello world! My name is Miku Hatsune.

$ python Miku -l Hatsune
Hello world! My name is Miku Hatsune.


No dependencies. Works on Python 3.x (Built on Python 3.6.2).

Features I crave

  • Type casting for type-annotated args

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

naam-0.1.1.tar.gz (3.1 kB view hashes)

Uploaded source

Built Distribution

naam-0.1.1-py3-none-any.whl (4.6 kB view hashes)

Uploaded py3

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