API Key initialization


I am working with the pyopenstates package and I am having a hard time setting up the apikey. When I attempt to use this function pyopenstates.set_api_key(apikey) I get an error saying “‘str’ object is not callable” and when I try to set the environment variable OPENSTATES_API_KEY I still get an error saying that there is no API key. Can you help?

I using a anacanda python 2.7 set up with a jupyter notebook. I was assuming I could just use this set_api_key([my_apikey]).


The guy who maintains pyopenstates isn’t on Discourse, so he won’t see this. I’d suggest opening an issue on https://github.com/openstates/pyopenstates. Sorry, I don’t use it.