pytx.init package

Module contents

pytx.init.init(app_id=None, app_secret=None, token_file=None)[source]

Use the app_id and app_secret to store the access_token globally for all instantiated objects to leverage.

If you use token_file, you can either:
  • put the app_id and app_token on separate lines
  • combine them with a “|” in between on a single line

If no options are passed into this function, it will check for the following environment variables:

  • TX_APP_ID
  • TX_APP_SECRET
  • TX_ACCESS_TOKEN

The latter is the combined app_id and app_secret with a “|” in between.

Parameters:
  • app_id (str) – The APP-ID to use.
  • app_secret (str) – The APP-SECRET to use.
  • token_file (str) – The full path and filename where to find the access token.
Raises:

errors.pytxIniterror

Table Of Contents

This Page