-
-
Save bChiquet/0292df44bb96d82dc3ebe7dcad218820 to your computer and use it in GitHub Desktop.
json+argparse
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse, json | |
parser = argparse.ArgumentParser(description='take a json as param') | |
parser.add_argument('json', metavar='N', type=str, nargs='?', | |
help='some json') | |
args = parser.parse_args() | |
print (json.loads(args.json)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment