Home | Python program to extract car information from VIN number
Python program to extract car information from VIN number

Python program to extract car information from VIN number

Hey geek! in this tutorial we are going to learn how to extract the car information from VIN using Python.

VIN stands for Vehicle Identification Number, which is an alphanumeric number of length 17, which consists of digits as well as alphabets.

VIN confirms our car own identity and also it has other uses too:

  1. It is used in warranty claims.
  2. For thefts and insurance coverage.
  3. And also for track calls.

First, we need to install a module in order to extract the information using VIN.

Installation of vininfo in Python

vininfo is a module that needed to be in our system.
The following command will help us in doing that.

pip install vininfo

With this command, we have installed vinfo in our system.
Let us code this out.

Python program to extract car information from VIN number

from vininfo import Vin
x = Vin('MAJGERTYKGHG56037')    
print(x.country)                  # the country to whcih the vehicle belongs
print(x.manufacturer)             # Name of the manufacturer

In the above code,

x is an object and with that object, we are extracting various information regarding the vehicle.

wmi stands for world manufacturer identifier,
vds stands for vehicle descriptor section and
vis stands for vehicle identification section.
The x.region in the code refers to, which continent the vehicle is manufactured in.



That’s it for this tutorial.

I hope you enjoyed it while reading.
If you have any queries please be free to comment out, we are with you.
Have a nice day.

Keep learning, keep enjoying.

Ofofonobs Blogger

Ikuesan Oluwaseun is the CEO of Ofofonobs and a Full-stack Developer. Ofofonobs.com is a Nigerian digital media and news platform launched in July 2020. Kindly check our contact page to get in touch with me.

More Reading

Post navigation

Leave a Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.