Here is the API from this website
curl -X POST -F data=@path/to/file.csv https://api-adresse.data.gouv.fr/search/csv/
I would like to know how to use this in python.
What I currently know is that from the same website, we also have this API
curl "https://api-adresse.data.gouv.fr/search/?q=8+bd+du+port"
With python we can do:
import requests
ADDOK_URL = 'http://api-adresse.data.gouv.fr/search/'
response = requests.get(ADDOK_URL, params={'q': '8 bd du port', 'limit': 5})
response.json()
But with
curl -X POST -F data=@path/to/file.csv https://api-adresse.data.gouv.fr/search/csv/
I have to specify a path of csv file. And I also don't know what are -X POST -F
.