{"id":37049729,"url":"https://github.com/pedrovasconcellos/fipe-table-library","last_synced_at":"2026-01-14T05:46:36.295Z","repository":{"id":54209735,"uuid":"239413033","full_name":"pedrovasconcellos/fipe-table-library","owner":"pedrovasconcellos","description":"Library to download the data from the FIPE table through FIPE WebAPI, developed using .NET;","archived":false,"fork":false,"pushed_at":"2024-08-29T19:35:25.000Z","size":144,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-21T01:48:27.981Z","etag":null,"topics":["fipe","fipetable"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pedrovasconcellos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-10T02:41:55.000Z","updated_at":"2024-12-19T18:25:06.000Z","dependencies_parsed_at":"2022-08-13T09:11:10.555Z","dependency_job_id":null,"html_url":"https://github.com/pedrovasconcellos/fipe-table-library","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/pedrovasconcellos/fipe-table-library","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrovasconcellos%2Ffipe-table-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrovasconcellos%2Ffipe-table-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrovasconcellos%2Ffipe-table-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrovasconcellos%2Ffipe-table-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pedrovasconcellos","download_url":"https://codeload.github.com/pedrovasconcellos/fipe-table-library/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrovasconcellos%2Ffipe-table-library/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28411385,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fipe","fipetable"],"created_at":"2026-01-14T05:46:35.607Z","updated_at":"2026-01-14T05:46:36.288Z","avatar_url":"https://github.com/pedrovasconcellos.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FIPE table Library [en-us]; Biblioteca da tabela FIPE [pt-br];\n\n## Description\n### Library for using vehicles data from the FIPE table.\n#### Version 5.0.0.\n#### License: MIT License\n#### Copyright (c) 2023 Pedro Vasconcellos\n##### Author: Pedro Henrique Vasconcellos\n##### Sponsor: https://vasconcellos.solutions\n\n## Note [en-us]:\n- Use the [FipeVehicleTypesEnum] enumerator to say what type of vehicle you want to download for.\n- Types of vehicles contained in the enumerator [FipeVehicleTypesEnum] (Car = 1, Motorcycle = 2, TruckAndMicroBus = 3)\n- If the (referenceId == 0), the most current reference will be used, that is, the most current data from the fipe table will be downloaded.\n- Warning: Do not call more than one FIPE library download service method in parallel, as the Proxy FIPE will block your IP for a certain time (5-10 minutes maybe).\n- If you want to create the tables in the relational database [MSSQL / SqlServer], there are SQL scripts in the directory=[../Vasconcellos.FipeTable.Database/Tables/].\n- If you to view [Vehicle.Year = 32000], it means that this vehicle is a Zero KM vehicle (New).\n- The slowing in the download is caused that of the proxy of the [FIPE WebAPI] that performs momentary blocks.\n- To avoid making requests while the proxy is locked, the service will pause the task for a few minutes and after will perform normal.\n- The truck download is the fastest among them.\n- Downloading the three types of vehicles together [Car, Motorcycle, Truck/MicroBus] takes between 2 or 4 hours\n\n## Observações [pt-br]:\n- Use o enumerador [FipeVehicleTypesEnum] para dizer qual o tipo de veículo você deseja realizar o downlad.\n- Tipos de veículos contidos no enumerador [FipeVehicleTypesEnum] (Carro = 1, Motocicleta = 2, Caminhão e Micro-Ônibus = 3)\n- Se o (referenceId == 0), a referência mais atual será usada, ou seja, os dados mais atuais da tabela fipe serão baixados.\n- Aviso: não chame mais de um método de serviço de download da biblioteca FIPE em paralelo, pois o Proxy da FIPE bloqueará o seu IP por um determinado tempo (talvez de 5 a 10 minutos).\n- Se você deseja criar as tabelas no banco de dados relacional [MSSQL / SqlServer], existem scripts SQL no diretório = [../Vasconcellos.FipeTable.Database/Tables/].\n- Se você visualizar [Vehicle.Year = 32000], quer dizer que este veículo, é um veículo Zero KM (Novo).\n- O lentidão no download é causado pelo proxy da [FIPE WebAPI], a qual executa bloqueios momentâneos.\n- Para evitar de fazer solicitações enquanto o proxy estiver bloqueado, o serviço pausará a tarefa por alguns minutos e depois será executado normalmente.\n- O download do caminhão é o mais rápido entre eles.\n- O download dos três tipos de veículos juntos [Carro, Motocicleta, Caminhão / MicroBus] leva entre 2 ou 4 horas\n\n## Library to download the data from the fipe table through FIPE WebAPI.\n- Nuget: https://www.nuget.org/packages/Vasconcellos.FipeTable.DownloadService\n- Nuget .NET CLI: dotnet add package Vasconcellos.FipeTable.DownloadService\n\n## Library with the entities for the use of vehicle data from the FIPE table.\n- Nuget: https://www.nuget.org/packages/Vasconcellos.FipeTable.Types\n- Nuget .NET CLI: dotnet add package Vasconcellos.FipeTable.Types\n\n## Library to upload the data from the fipe table in the database through FIPE Web API. Save the data from the fipe table on Mongodb\n- Nuget: https://www.nuget.org/packages/Vasconcellos.FipeTable.UploadService\n- Nuget .NET CLI: dotnet add package Vasconcellos.FipeTable.UploadService\n\n## Implementing the library\nExample of using the FipeTable.DownloadService Library.\n```csharp\nusing Microsoft.Extensions.DependencyInjection;\nusing Microsoft.Extensions.Logging;\nusing Vasconcellos.FipeTable.DownloadService.Infra;\nusing Vasconcellos.FipeTable.DownloadService.Infra.Interfaces;\nusing Vasconcellos.FipeTable.DownloadService.Models.NormalizedDownloads;\nusing Vasconcellos.FipeTable.DownloadService.Services;\nusing Vasconcellos.FipeTable.DownloadService.Services.Interfaces;\nusing Vasconcellos.FipeTable.Types.Enums;\n\nnamespace ConsoleApp\n{\n    public class Program\n    {\n        private static ILogger _logger;\n        private static IHttpRequestSettings _httpRequestSettings;\n        private static IHttpRequest _httpRequest;\n        private static IFipeDownloadService _downloadService;\n        private static IFipeNormalizedDownloadService _normalizedDownloadService;\n\n        static void Main(string[] args)\n        {\n            Init();\n\n            _logger.LogDebug(\"Starting Console FIPE TABLE.\");\n\n            var lastFipeReference = _downloadService.GetFipeTableReference();\n            var result = GetExample(FipeVehicleTypesEnum.TruckAndMicroBus, lastFipeReference.Id);\n\n            _logger.LogDebug(result.Vehicles[0]?.Id);\n            _logger.LogDebug(\"Finalizing Console FIPE TABLE.\");\n        }\n\n        static void Init()\n        {\n            using var serviceProvider = new ServiceCollection()\n                .AddLogging(config =\u003e\n                    config\n                        .ClearProviders()\n                        .AddConsole()\n                        .SetMinimumLevel(LogLevel.Trace)\n                    )\n                .BuildServiceProvider();\n\n            _logger = serviceProvider\n                .GetService\u003cILoggerFactory\u003e()\n                .CreateLogger\u003cProgram\u003e();\n\n            _httpRequestSettings = new HttpRequestSettings();\n            _httpRequest = new HttpRequest(_logger, _httpRequestSettings);\n            _downloadService = new FipeDownloadService(_logger, _httpRequest);\n            _normalizedDownloadService = new FipeNormalizedDownloadService(_logger, _downloadService);\n        }\n\n\n        static NormalizedDownloadResult GetExample(FipeVehicleTypesEnum vehicleType, int referenceId)\n        {\n            var downloadResult = _normalizedDownloadService\n                .GetDataFromFipeTableByVehicleType(vehicleType, referenceId);\n            \n            if (downloadResult.VehicleType == vehicleType \n                \u0026\u0026 downloadResult.FipeReference.Id == referenceId \n                \u0026\u0026 downloadResult.Brands.Count \u003e 0 \n                \u0026\u0026 downloadResult.Models.Count \u003e 0 \n                \u0026\u0026 downloadResult.Vehicles.Count \u003e 0 \n                \u0026\u0026 downloadResult.Prices.Count \u003e 0)\n                return downloadResult;\n            else\n                throw new ArgumentNullException(nameof(downloadResult));\n        }\n    }\n}\n```\n\nExample of using the FipeTable.UploadService Library.\n```csharp\nusing Microsoft.Extensions.DependencyInjection;\nusing Microsoft.Extensions.Logging;\nusing System;\nusing Vasconcellos.FipeTable.DownloadService.Infra;\nusing Vasconcellos.FipeTable.DownloadService.Infra.Interfaces;\nusing Vasconcellos.FipeTable.DownloadService.Services;\nusing Vasconcellos.FipeTable.DownloadService.Services.Interfaces;\nusing Vasconcellos.FipeTable.UploadService.Domains;\nusing Vasconcellos.FipeTable.UploadService.Domains.Interfaces;\nusing Vasconcellos.FipeTable.UploadService.Repositories;\nusing Vasconcellos.FipeTable.UploadService.Repositories.Interfaces;\nusing Vasconcellos.FipeTable.UploadService.Services;\nusing Vasconcellos.FipeTable.UploadService.Services.Interfaces;\n\nnamespace Vasconcellos.FipeTable.ConsoleApp\n{\n    public class Program\n    {\n        private static ILogger _logger;\n        private static IHttpRequestSettings _httpRequestSettings;\n        private static IHttpRequest _httpRequest;\n        private static IFipeDownloadService _downloadService;\n        private static IFipeNormalizedDownloadService _normalizedDownloadService;\n        private static string _connectionString;\n        private static IRepository _repository;\n        private static IFipeUploadDomain _uploadDomain;\n        private static IFipeUploadService _uploadService;\n\n        static void Main(string[] args)\n        {\n            Init();\n            \n            _logger.LogInformation(\"Starting Console FIPE TABLE.\");\n\n            _uploadService.ProcessUpload().Wait();\n\n            _logger.LogInformation(\"Finalizing Console FIPE TABLE.\");\n            Console.ReadKey();\n        }\n\n        private static void Init()\n        {\n            InitConnectionStrig();\n            InitILogger();\n            InitDownloadService();\n            InitUploadService();\n        }\n\n        private static void InitConnectionStrig()\n        {\n            _connectionString = Environment.GetEnvironmentVariable(\"Vasconcellos.FipeTable.ConsoleApp.MongoDB\");\n\n            if (string.IsNullOrEmpty(_connectionString))\n                throw new ArgumentException($\"The {nameof(_connectionString)} cannot be null or empty\");\n        }\n\n        private static void InitILogger()\n        {\n            using var serviceProvider = new ServiceCollection()\n                .AddLogging(config =\u003e\n                    config\n                        .ClearProviders()\n                        .AddConsole()\n                        .SetMinimumLevel(LogLevel.Debug)\n                    )\n                .BuildServiceProvider();\n\n            _logger = serviceProvider\n                .GetService\u003cILoggerFactory\u003e()\n                .CreateLogger\u003cProgram\u003e();\n\n            if (_logger is null)\n                throw new ArgumentNullException(nameof(_logger));\n        }\n\n        private static void InitDownloadService()\n        {\n            _httpRequestSettings = new HttpRequestSettings();\n            _httpRequest = new HttpRequest(_logger, _httpRequestSettings);\n            _downloadService = new FipeDownloadService(_logger, _httpRequest);\n            _normalizedDownloadService = new FipeNormalizedDownloadService(_logger, _downloadService);\n        }\n\n        private static void InitUploadService()\n        {\n            _repository = new MongoDBRepository(_logger, _connectionString);\n            _uploadDomain = new FipeUploadDomain(_repository);\n            _uploadService = new FipeUploadService(_logger, _downloadService, _normalizedDownloadService, _uploadDomain);\n        }\n    }\n}\n```\n## Sponsor\n[![Vasconcellos Solutions](https://vasconcellos.solutions/assets/open-source/images/company/vasconcellos-solutions-small-icon.jpg)](https://www.vasconcellos.solutions)\n### Vasconcellos IT Solutions","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedrovasconcellos%2Ffipe-table-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpedrovasconcellos%2Ffipe-table-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedrovasconcellos%2Ffipe-table-library/lists"}