davidpeckham / vin Goto Github PK
View Code? Open in Web Editor NEWValidate and decode Vehicle Identification Numbers
Home Page: https://vin.readthedocs.io
License: MIT License
Validate and decode Vehicle Identification Numbers
Home Page: https://vin.readthedocs.io
License: MIT License
Due to a production issue, Hyundai produced the following 2024 Hyundai Genesis vehicles with incorrect check digits. NHTSA granted an exception for these vehicles and vPIC decodes them correctly:
There are some VINs I've ran across where the make is not available after decoding, which would raise this exception. But even more prevalent is if you are decoding a gasoline car, electrification level will be None raising this:
Lines 261 to 263 in c79f282
Or have it match this library's behavior, so it is more of a drop-in replacement. I thought a formal issue would be a good idea to track this and for discussion.
For example, invalid or foreign (format, check digit, and/or model year character bad) VINs throw an immediate exception instead of returning an object where you can check an error code/text field. I think it is best if you can parse as much of the VIN that VPIC lets you (even if just make), with some error field
Standardize return values: does None for electrification_level mean unknown or no electrification?
In [11]: TypedClient().decode_vin('5FNRL6H4X').electrification_level
Out[11]: ''
Partial decoding would be nice, but not required
In [16]: TypedClient().decode_vin('4T1C31AK').electrification_level
Out[16]: 'HEV (Hybrid Electric Vehicle) - Level Unknown'
In [17]: VIN('4T1C31AK').electrification_level
ValueError: VIN must be exactly 17 characters long
Model year is an int in this library, and a string in vpic-api
I'm receiving the following Error message when decoding a VIN using a Flask App served by Waitress:
sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread. The object was created in thread id 8083607552 and this is thread id 11711803392.
From my understanding, it's a simple issue of the check_same_thread
option upon opening the SQLite connection.
Return the publication date of the NHTSA vPIC data bundled with this package. See https://vpic.nhtsa.dot.gov/decoder/Home/ReleaseNotes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.