Documentation Index
Fetch the complete documentation index at: https://mintlify.com/markzuckerbergas/gbmplus-api-python/llms.txt
Use this file to discover all available pages before exploring further.
GBMPlusAPI accepts a set of optional keyword arguments that control session behaviour, retries, timeouts, and logging. Every parameter has a sensible default value defined in gbmplus/config.py, so you only need to override the ones that differ from your target environment. Credentials (user_email, user_password, client_id) are the sole required inputs — they can be supplied either directly or through environment variables.
Parameter reference
GBM+ account email address used for authentication. When omitted, the SDK
reads the
USER_EMAIL environment variable.GBM+ account password used for authentication. When omitted, the SDK reads
the
USER_PASSWORD environment variable.GBM+ client ID associated with your account. When omitted, the SDK reads the
CLIENT_ID environment variable.Maximum number of seconds to wait for a single API call before raising a
timeout error. Increase this value if you are on a slow connection or calling
endpoints that return large payloads.
Maximum number of times the SDK will retry a request after encountering
server-side (5XX) errors or network-level exceptions. Set to
0 to disable
retries entirely.When
True, the SDK also retries requests that return 4XX HTTP errors instead
of raising an APIError immediately. Useful for handling transient rate-limit
responses. Has no effect unless maximum_retries is greater than 0.Upper bound in seconds for the random back-off wait before retrying a 4XX
error. The actual wait is chosen randomly between
1 and this value each
retry attempt. Only applies when retry_4xx_error=True.When
True, the SDK writes a log file to the directory specified by
log_path. The filename includes the log_file_prefix and the timestamp at
session creation.Directory path where the log file is written. Defaults to an empty string,
which resolves to the current working directory of the running script. A
trailing
/ is added automatically if missing.Prefix prepended to the log filename. The full filename format is
{log_file_prefix}_log__{YYYY-MM-DD_HH-MM-SS}.log.When
True, log output is also printed to the console (stdout) at INFO
level and above. Set to False to silence terminal output while still
writing to a log file.When
True, all logging is completely disabled — no log file is created and
nothing is printed to the console. Takes precedence over all other logging
parameters. Recommended for production scripts where performance matters.Default values
The following constants are defined ingbmplus/config.py and serve as the defaults for every session:
Example configurations
The examples below cover the most common setup scenarios. Mix and match parameters to suit your environment.- Minimal / silent
- Log to file only
- Enable 4XX retry
- Custom log prefix
Disable all logging and use a shorter timeout — useful for lightweight scripts or automated jobs where you want no output: