generated from gormaniac/pyproject-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support env vars for user/pass in import
- Loading branch information
Showing
3 changed files
with
29 additions
and
48 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
"""CLI arguments shared by more than one script.""" | ||
|
||
|
||
import argparse | ||
|
||
USER_PARSER = argparse.ArgumentParser(add_help=False) | ||
USER_PARSER.add_argument( | ||
"--user", | ||
help=( | ||
"The Cortex user to authenticate with. The CORTEX_USER env var may be used" | ||
" instead of this argument, however; this argument overrides the env var." | ||
" If neither --user or CORTEX_USER are used, a prompt will appear to either" | ||
" input a value or accept the default (return of getpass.getpass()). Only" | ||
" works when connecting to a Cortex over HTTP." | ||
), | ||
) |
This file contains 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
This file contains 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