项目作者: idlesign

项目描述 :
Extracts useful information from Vehicle Identification Number (VIN)
高级语言: Python
项目地址: git://github.com/idlesign/vininfo.git
创建时间: 2018-07-26T13:31:28Z
项目社区:https://github.com/idlesign/vininfo

开源协议:BSD 3-Clause "New" or "Revised" License

下载


vininfo

https://github.com/idlesign/vininfo

PyPI - Version
License
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.10+
  • click package for CLI

Usage

CLI

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

  1. pip install vininfo[cli]
  1. $ vininfo --help
  2. ; Print out VIN info:
  3. $ vininfo show XTAGFK330JY144213
  4. ; Basic:
  5. ; Country: USSR/CIS
  6. ; Manufacturer: AvtoVAZ
  7. ; Region: Europe
  8. ; Years: 2018, 1988
  9. ; Details:
  10. ; Body: Station Wagon, 5-Door
  11. ; Engine: 21179
  12. ; Model: Vesta
  13. ; Plant: Izhevsk
  14. ; Serial: 144213
  15. ; Transmission: Manual Renault
  16. ; Verify checksum
  17. $ vininfo check 1M8GDM9AXKP042788
  18. ; Checksum is valid

Python

  1. from vininfo import Vin
  2. vin = Vin('VF1LM1B0H36666155')
  3. vin.country # France
  4. vin.manufacturer # Renault
  5. vin.region # Europe
  6. vin.wmi # VF1
  7. vin.vds # LM1B0H
  8. vin.vis # 36666155
  9. annotated = vin.annotate()
  10. details = vin.details
  11. vin.verify_checksum() # False
  12. 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).