Configuring Settings¶
All settings for the Incydr SDK Client are managed by the IncydrSettings model, which inherits from
pydantic.BaseSettings.
class 
_incydr_sdk.core.settings.IncydrSettings(*, api_client_id, api_client_secret, url, page_size=100, max_response_history=5, use_rich=True, log_stderr=True, log_file=None, log_level=30, logger=None, user_agent_prefix='')Configure settings on the incydr.Client.
Usage:
>> import incydr
>>> client = incydr.Client(page_size = 10)
Settings can also be loaded from shell environment variables or .env files. Just prefix a setting's attribute name
with INCYDR_ when configuring via enviroment vars.
For example: To load client.settings.api_client_secret from the environment, set
INCYDR_API_CLIENT_SECRET="my_secret".
The incydr.Client loads settings in the following priority:
- Args passed to 
Clientconstructor - Shell environment variables
 - An .env file in the current working directory
 - An .env file in 
~/.config/incydrdirectory 
Attributes:
- api_client_id: 
strThe API Client Identifier for authentication. env_var=INCYDR_API_CLIENT_ID - api_client_secret: 
strThe API Client Secret for authentication. env_var=INCYDR_API_CLIENT_SECRET - url: 
strThe URL of your Code42 API gateway instance. env_var=INCYDR_URL - page_size: 
intThe default page size for all paginated requests. Defaults to 100. env_var=INCYDR_PAGE_SIZE - max_response_history: 
intThe maximum number of responses theincydr.Client.response_historylist will store. Defaults to 5. env_var=INCYDR_MAX_RESPONSE_HISTORY - log_stderr: 
boolEnables logging to stderr. Defaults to True. env_var=INCYDR_LOG_STDERR - log_file: 
strThe file path or file-like object to write log output to. Defaults to None. env_var=INCYDR_LOG_FILE - log_level: 
intThe level for logging messages. Defaults tologging.WARNING. env_var=INCYDR_LOG_LEVEL - logger: 
logging.LoggerThe logger used for client logging. Cannot be defined via environment variable. Can be replaced with a customlogging.Logger. If a customLoggeris supplied, the other log settings will have no effect and must be configured manually on the custom logger. - user_agent_prefix: 
strPrefixes allUser-Agentheaders with the supplied string. - use_rich: 
boolEnables rich support in logging and the Python repl. Defaults to True. env_var=INCYDR_USE_RICH