0

Using the example project provided by chirp.io is there anyway to enable offline mode? Also how do I create a local config file and reference it when in offline mode when running the python script?

Sheldon
  • 175
  • 9

1 Answers1

1

Chirp SDKs will work offline if you supply it with a config file/string. However if you want the SDK to make 0 network requests for things like GDPR or COPPA compliance, then you will need to get in touch at sales@chirp.io and make a request to access offline mode.

But to answer your question, you will need to visit developers.chirp.io, and click download on a specific configuration. Inside the downloaded file will be a base64 encoded string. For most Chirp SDKs you will need to copy and paste this string into your app, but for the Python SDK you can just pass the path to the config file as the third argument when instantiating the SDK

app_key = 'xxxxxxxxxxxxxxxxxxxxxxxx'
app_secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
app_config = '/path/to/config/file'

sdk = ChirpConnect(app_key, app_secret, app_config)

Alternatively you can set up a ~/.chirprc file to automatically configure the SDK. Check out chirp on the command line for this.

joextodd
  • 694
  • 4
  • 9