Giter Club home page Giter Club logo

vininfo's Introduction

vininfo

https://github.com/idlesign/vininfo

release lic ci coverage

Description

Extracts useful information from Vehicle Identification Number (VIN)

  • Can be used as a standalone console application (CLI).
  • One can also use import it as any other package in your Python code.
  • Gives basic and detailed info (is available) about VIN.
  • Allows VIN checksum verification.

Additional info available for many vehicles from:

  • AvtoVAZ
  • Nissan
  • Opel
  • Renault

Requirements

  • Python 3.6+
  • click package for CLI

Usage

CLI

click package is required for CLI. You can install vininfo with click using:

$ pip install vininfo[cli]
$ vininfo --help

; Print out VIN info:
$ vininfo show XTAGFK330JY144213

; Basic:
; Country: USSR/CIS
; Manufacturer: AvtoVAZ
; Region: Europe
; Years: 2018, 1988
;
; Details:
; Body: Station Wagon, 5-Door
; Engine: 21179
; Model: Vesta
; Plant: Izhevsk
; Serial: 144213
; Transmission: Manual Renault

; Verify checksum
$ vininfo check 1M8GDM9AXKP042788
; Checksum is valid

Python

from vininfo import Vin

vin = Vin('VF1LM1B0H36666155')

vin.country  # France
vin.manufacturer  # Renault
vin.region  # Europe
vin.wmi  # VF1
vin.vds  # LM1B0H
vin.vis  # 36666155

annotated = vin.annotate()
details = vin.details

vin.verify_checksum()  # False
Vin('1M8GDM9AXKP042788').verify_checksum()  # True

Development

One can add missing WMI(s) using instructions from dicts/wmi.py: WMI dictionary, that maps WMI strings to manufacturers.

Those manufacturers may be represented by simple strings, or instances of Brand subclasses (see brands.py).

If you know how to decode additional information (model, body, engine, etc.) encoded in VIN, you may also want to create a so-called details extractor for a brand.

Details extractors are VinDetails subclasses in most cases making use of Detail descriptors to represent additional information (see details/nissan.py for example).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.