Skip to content

Commit

Permalink
Added debugging and baseurl funtionality, Related to #1181
Browse files Browse the repository at this point in the history
  • Loading branch information
okewoma authored and jshcodes committed Jul 19, 2024
1 parent 03d3be7 commit df6ba23
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions samples/authentication/token_authentication_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@
This sample should run using any version of FalconPy and requires the colorama and click libraries.
"""
import logging
import os
import click
import colorama
from argparse import ArgumentParser, RawTextHelpFormatter, Namespace
from falconpy import (
CloudConnectAWS,
Detects,
Expand All @@ -54,6 +56,20 @@
BOLD = colorama.Style.BRIGHT
ENDMARK = colorama.Style.RESET_ALL

def consume_arguments() -> Namespace:
parser = ArgumentParser(description=__doc__, fromatter_class=RawTextHelpFormatter)
parser.add_argument("-d", "--debug",
help="Enable API debugging",
action="store_true",
default=False
)
parser.add_argument("-b", "--base-url",
dest="base_url",
help="CrowdStrike cloud region. (auto or usgov1, Default: auto)",
required=False,
default="auto"
)
return parser.parse_args

# ### BEGIN token simulation
def get_token():
Expand Down

0 comments on commit df6ba23

Please sign in to comment.