pythongdata-api

How to distribute script using gdata-python-client?


I've written several scripts that make use of the gdata API, and they all (obviously) have my API key and client ID in plain-text. How am I supposed to distribute these?


Solution

  • Move the variables into a separate module and replace your values with dummy values. Make sure you trap for an invalid key and provide instructions on how to obtain a key and where to place it. In your code you can just import the values from that module.

    import gdata_api_key
    print gdata_api_key.key_value