Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 412
miniman Avatar asked Dec 02 '25 22:12

miniman


1 Answers

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
like image 92
Sam Corder Avatar answered Dec 05 '25 11:12

Sam Corder



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!