Have a look at the official tutorial on api.insee.fr

API Subscription TutorialΒΆ

  1. Create an account on api.insee.fr

  2. Create an application

  3. Create credentials

  4. Subscribe to all APIs

  5. Show your credentials

  6. Save your credentials with init_conn function





# Subscribe to api.insee.fr and get your credentials!
# Save your credentials with init_conn function :
from pynsee.utils.init_conn import init_conn
init_conn(insee_key="my_insee_key", insee_secret="my_insee_secret")

# Beware : any change to the keys should be tested after having cleared the cache
# Please do : from pynsee.utils import clear_all_cache; clear_all_cache()