Skip to content

Instantly share code, notes, and snippets.

@vieirin
Last active June 8, 2021 00:54
Show Gist options
  • Save vieirin/9041e90945f0b20fd4a14e2589167fca to your computer and use it in GitHub Desktop.
Save vieirin/9041e90945f0b20fd4a14e2589167fca to your computer and use it in GitHub Desktop.
import requests
import json
endpoint = 'https://dadosabertos.camara.leg.br/api/v2/proposicoes'
params = {"numero": 2945, "ordem": 'ASC', "ordenarPor": "id", "ano": 2020}
response = requests.get(endpoint, params=params).json()
json.dump(response, open('/tmp/arquivosalvo.json', 'w'), indent=4, sort_keys=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment