parser.add_argument('-u', '--url', action=EnvDefault, envvar='URL', help=
    'Specify the URL to process (can also be specified using URL environment variable)'
    )
args = parser.parse_args()
Setting options from environment variables when using argparse