pycancensus.set_api_key
- pycancensus.set_api_key(api_key: str, install: bool = False) None[source]
Set the CensusMapper API key.
- Parameters:
api_key (str) – Your CensusMapper API key. Get a free key at https://censusmapper.ca/users/sign_up
install (bool, default False) – If True, saves the API key persistently for future sessions.
Examples
>>> import pycancensus as pc >>> pc.set_api_key("your_api_key_here") >>> pc.set_api_key("your_api_key_here", install=True) # Persist for future sessions