Blackfynn stores connection information in your Blackfynn configuration file. Advanced users might want to edit their Blackfynn client tool configuration file directly for advanced control of the client libraries. Alternatively, users can modify the client behavior using environment variables. This document outlines the structure of the configuration file, and the environment variables that the client tools utilize.

NOTE: The recommended way for managing settings is using the Command Line Tool.
NOTE: Advanced configuration is currently only available in the Python client.

The Blackfynn Configuration File

Location

Your configuration file located in your .blackfynn directory. The .blackfynn/ directory is typically found in your $HOME directory (Mac/Linux) or your User’s directory (Windows).

Full path: $HOME/.blackfynn/config.ini

NOTE: If you have BLACKFYNN_DIR environment variable set, your configuration file will be located in:

${BLACKFYNN_DIR}/.blackfynn/config.ini 

Format

Example of the config.ini file:

# GLOBAL SETTINGS

[global]
default_profile = default

# PROFILES

[default]
api_token = c09be34d-5696-4c49-b174-7fe3fb3194af
api_secret = 87092fd-b3ad-4de9-bf78-2dbcedb7737a

[debug_mode]
use_cache = false
log_level = DEBUG
api_token = c09be34d-5696-4c49-b174-7fe3fb3194af
api_secret = 87092fd-b3ad-4de9-bf78-2dbcedb7737a

[super_conn]
api_token = da064188-47e4-43b0-b5cd-91805b7522d7
api_secret = 2a543888-d24d-4958-8833-3311a55e4ed6

The config file is in INI format. There are two types of sections:

  • Global Settings: section [global] 
  • Profiles: all other section(s)

Profile Settings

Available settings under [<profile>] or [global]:

# connection
api_token
api_secret

# settings
log_level
use_cache
cache_inspect_interval

# advanced
max_request_time
max_upload_workers
max_request_timeout_retries
stream_name
stream_max_segment_size
api_host
streaming_api_host

In addition to the above, these settings are available under [global]:

# default profile (name)
default_profile

# advanced global settings
cache_max_size
ts_page_size


Environment Variables

To see your current configuration (and any variables), use the command line tool:

  • Configuration and ENV VARS: bf env  or bf --profile=<profile> env 
  • Profile settings: bf profile list -c 

NOTE: Environment variables (if present) override any profile-defined settings in your Blackfynn Configuration File. They are useful for terminal-specific settings.

Connection

To switch between profiles in a given terminal session, set the environment variable:

  • BLACKFYNN_PROFILE: your profile name

Alternatively, you can specify your token/secret directly:

  • BLACKFYNN_API_TOKEN: your token string
  • BLACKFYNN_API_SECRET: your secret string

Settings

  • BLACKFYNN_LOG_LEVEL: ('DEBUG'  or 'INFO' )
  • BLACKFYNN_USE_CACHE: 0  (false) or 1  (true)
  • BLACKFYNN_API_LOC 
  • BLACKFYNN_STREAMING_API_LOC 
  • BLACKFYNN_STREAM_NAME 
  • BLACKFYNN_CACHE_MAX_SIZE 
  • BLACKFYNN_CACHE_INSPECT_EVERY 
  • BLACKFYNN_TS_PAGE_SIZE 
Did this answer your question?