Cliente oficial da Altis FIPE API — consulte a Tabela FIPE (carros, motos, caminhões) com uma chave de API.
Project description
altis-fipe
Cliente oficial Python da Altis FIPE API. Consulte a Tabela FIPE (carros, motos e caminhões).
Instalação
pip install altis-fipe
Pegue sua chave (grátis)
- Crie a conta em https://fipe.altis.online/cadastro — você ganha 1.000 créditos de cortesia.
- Copie a chave
fpk_live_.... - Exporte:
export ALTIS_FIPE_KEY="fpk_live_xxxxxxxxxxxx"
Uso
import os
from altis_fipe import AltisFipe
fipe = AltisFipe(api_key=os.environ["ALTIS_FIPE_KEY"])
brands = fipe.cars.brands() # 0 créditos
models = fipe.cars.models(56)
years = fipe.cars.years(56, 9984)
quote = fipe.cars.quote(brand_id=56, model_id=9984, year_id="2025-6")
print(quote["model"], quote["price"], quote["referenceMonth"])
Como context manager (fecha a conexão automaticamente):
with AltisFipe(api_key=os.environ["ALTIS_FIPE_KEY"]) as fipe:
print(fipe.motorcycles.brands())
Tratamento de erros
from altis_fipe import AltisFipe, AltisFipeError
try:
fipe.cars.quote(brand_id=56, model_id=9984, year_id="2025-6")
except AltisFipeError as err:
if err.is_out_of_credits:
print("Sem créditos.")
elif err.is_rate_limited:
print("Rate limit.")
elif err.is_auth_error:
print("Chave inválida.")
else:
print(err.code, err.message, err.details)
Combustível (year_id)
year_id segue o padrão YYYY-F: 1=Gasolina, 2=Álcool, 3=Diesel, 4=Flex, 5=Elétrico, 6=Híbrido.
Licença
Proprietária — Altis 2026.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file altis_fipe-0.1.0.tar.gz.
File metadata
- Download URL: altis_fipe-0.1.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8854b01366187a9d60ef2cdb998bbbfa0401f03ddb6c5124196b5cfd6bd17091
|
|
| MD5 |
018a7f2d9fccdc33131c9c5de9f45d70
|
|
| BLAKE2b-256 |
f020b403258ed7a344ec6419f2408ffffcb021ac61ce7acae7aaf8671afc253c
|
File details
Details for the file altis_fipe-0.1.0-py3-none-any.whl.
File metadata
- Download URL: altis_fipe-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15556e3e3fe0d76f344e55cfd4b9b9e14cb92bd85d690b3830af1e408d4c1090
|
|
| MD5 |
413cafd2d21715dbec66ba7c3ff192f0
|
|
| BLAKE2b-256 |
0c63823610cd9cd6c0eec3cfc38935ae7b835f60f3f8bb1ead120a951e6e3b48
|