Simple access library of data from the "Table Fipe".
Vehicle information: Manufacturer, Model, Vehicle, versions and prices.
For install sxtools, run on terminal:
$ [sudo] cd tabela_fipe $ [sudo] python setup.py install
from tabela_fipe import TabelaFipe
tab_fipe = TabelaFipe()
info = tab_fipe.get_modelo(mod_codigofipe='006008-9')
print('Marca: ' + info['mar_text'])
print('Modelo: ' + info['mod_text'])
print('Categoria: ' + info['mod_categoria'])
print('Versoes: ')
for ver in info['versoes']:
print(
'\t%s a %s custa %.2f reais ' % (
ver['ano'],
ver['combustivel'],
ver['valor']
)
)
- Source hosted at GitHub
Pull requests are very welcomed! Make sure your patches are well tested.
All you need is:
$ nosetests -dsv --with-yanc --with-coverage --cover-package tabela_fipe tests/*.py