A library to programatically explore the Brazilian open data program.
More details at dados.gov.br
Basically, I did this library because their web interface was broken for me, specially the search feature.
Also, I feel more confortable exploring the data using a python shell with all the libraries available to handle json, csv and so on.
Available in PyPi, just:
$ pip install dadosgovbr
The library just provides an "object-wrapping" for the API results, so we can access every attribute as we inspect any regular python object:
>>> from dadosgovbr import DadosGovBR >>> api = DadosGovBR() >>> api.get_tag('VT') Tag(vocabulary_id=None, packages=<generator object model_list_factory at 0x7f7dac17af00>, display_name=u'VT', id=u'41a7ab78-3cec-44a3-b2c3-ca15ad55a50f', name=u'VT')
Check the tests directory for more examples, like this one.
This is very work-in-progress lib. Contributions are super-welcome. =)
- fork the project
- create virtualenv (optional)
- pip install -r requirements-devel.txt
- pre-commit install