How to use the vininfo.details._base.Detail function in vininfo

To help you get started, we’ve selected a few vininfo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github idlesign / vininfo / vininfo / details / opel.py View on Github external
'2': BODY_HATCH_3,
        '3': BODY_COUPE_2,
        '5': BODY_SEDAN_4,
        '6': BODY_HATCH_5,
        '7': BODY_CROSS_3,
        '8': BODY_SW_5,
        '9': BODY_MINIVAN_5,
        'B': BODY_MINIBUS,
        'C': BODY_VAN,
        'J': BODY_VAN,
        'X': BODY_SW_3,
    })

    engine = Detail(('vds', 4), get_engine)

    plant = Detail(('vis', 1), {
        '1': 'Russelsheim',
        '2': 'Bochum',
        '3': 'Azambuja',
        '4': 'Zaragoza',
        '5': 'Antwerp',
        '6': 'Eisenach',
        '7': 'Luton',
        '8': 'Ellesmere Port',
        '9': 'Uusikaupunki',
        'A': 'Azambuja',
        'B': 'Bertone / Saint Peterburg',
        'C': 'Yelabuga',
        'D': 'Shin Chuang',
        'E': 'Heuliez',
        'F': 'Togliatti',
        'G': 'Gliwice',
github idlesign / vininfo / vininfo / details / renault.py View on Github external
'G': 'Grand Coronne / Novo Mesto',
        'H': 'Haren',
        'J': 'Billancourt',
        'K': 'Dieppe',
        'N': 'Mexico',
        'P': 'Mexico',
        'R': 'Bursa / Moscow',
        'S': 'Sandouville',
        'T': 'Romorantin',
        'U': 'Maubeuge',
        'W': 'Valladolid',
        'X': 'Heuliez',
        'Z': 'USA',  # ? city
    })

    transmission = Detail(('vds', 5), {
        '1': 'Automatic, 3-Gears',
        '2': 'Automatic, 4-Gears',
        '4': 'Manual, 5-Gears',
        '5': 'Manual, 5-Gears',
        '8': 'Manual, 5-Gears, 4x4',
        'C': 'Manual, 5-Gears',
        'D': 'Manual, 5-Gears',
    })

    serial = Detail(('vis', slice(1, None)))
github idlesign / vininfo / vininfo / details / nissan.py View on Github external
"""Nissan VIN details extractor."""

    model = Detail(('vds', 1), {
        'A': ['Armada', 'Titan', 'Maxima'],
        'B': 'Sentra',
        'C': 'Versa (07-11)',
        'D': ['Truck', 'Xterra (00-04)', 'Frontier'],
        'J': 'Maxima',
        'N': 'Xterra (05-11)',
        'R': 'Pathfinder',
        'S': ['240SX', 'Rogue (08-11)'],
        'U': 'Altima',
        'Z': ['300Z', '350Z', 'Murano'],
    })

    body = Detail(('vds', 3), {
        '1': [BODY_SEDAN_4, 'Standard Body Truck'],
        '4': BODY_COUPE_2,
        '5': BODY_SW_5,
        '6': [BODY_CABRI_2, 'Fastback', 'King Cab Truck'],
        '7': 'Crew Cab Truck',
        '8': BODY_SW_8,
    })

    engine = Detail(('vds', 0), {
        'A': ['VG30D', 'VK45DE', 'VQ35DE', 'VK56DE', 'VQ40DE', 'QR25DE'],
        'B': ['KA24DE', 'SR20DE', 'VQ35HR', 'MR18DE', 'QR25DE'],
        'C': ['SR20DE', 'VG30DETT', 'QG18DE'],
        'D': ['KA24DE', 'QG18DE', 'VQ35DE'],
        'E': ['VE30DE', 'GA16DE', 'VG33E'],
        'F': 'KA24E',
        'H': 'VG30E',
github idlesign / vininfo / vininfo / details / opel.py View on Github external
'C': 'Z14XEP100HP',
            'D': 'A14NEL120HP',
            'E': 'A14NET140HP',
        },
        'J': {
            '8': 'A14NET140HP',
        },
    }

    return candidates.get(details.model.code, {})


class OpelDetails(VinDetails):
    """Opel VIN details extractor."""

    model = Detail(('vds', 0), {
        'F': 'Agila',
        'G': 'Insignia',
        'J': 'Mokka',
        'L': 'Antara',
        'M': 'Movano',
        'P': ['Astra J', 'Zafira C'],
        'R': 'Astra GTC J',
        'S': 'Meriva',
        'V': 'Combo II',
        'W': 'Cascada',
    })

    body = Detail(('vds', 2), {
        '2': BODY_HATCH_3,
        '3': BODY_COUPE_2,
        '5': BODY_SEDAN_4,
github idlesign / vininfo / vininfo / details / _base.py View on Github external
annotate_titles = {
        'body': 'Body',
        'engine': 'Engine',
        'model': 'Model',
        'plant': 'Plant',
        'transmission': 'Transmission',
        'serial': 'Serial',
    }

    def __init__(self, vin: 'Vin'):
        self._vin = vin

    body = Detail()
    engine = Detail()
    model = Detail()
    plant = Detail()
    transmission = Detail()
    serial = Detail()
github idlesign / vininfo / vininfo / details / renault.py View on Github external
from ._base import VinDetails, Detail
from ..dicts.bodies import *


class RenaultDetails(VinDetails):
    """Renault VIN details extractor."""

    model = Detail(('vds', 1), {
        '0': 'Twingo',
        '1': 'R4',
        '2': 'R25',
        '3': 'R4',
        '4': ['R21', 'Express'],
        '5': ['Clio I', 'Laguna', 'R19', 'Safrane'],
        'A': ['Megane I', 'Master'],
        'B': 'Clio II',
        'C': 'Kangoo',
        'D': 'Master',
        'E': ['Espace III', 'Avantime'],
        'G': 'Laguna II',
        'H': 'Master Propulsion',
        'J': ['Vel Satis', 'New Trafic'],
        'K': 'Espace IV',
        'L': 'Trafic',
github idlesign / vininfo / vininfo / details / nissan.py View on Github external
'R': 'Pathfinder',
        'S': ['240SX', 'Rogue (08-11)'],
        'U': 'Altima',
        'Z': ['300Z', '350Z', 'Murano'],
    })

    body = Detail(('vds', 3), {
        '1': [BODY_SEDAN_4, 'Standard Body Truck'],
        '4': BODY_COUPE_2,
        '5': BODY_SW_5,
        '6': [BODY_CABRI_2, 'Fastback', 'King Cab Truck'],
        '7': 'Crew Cab Truck',
        '8': BODY_SW_8,
    })

    engine = Detail(('vds', 0), {
        'A': ['VG30D', 'VK45DE', 'VQ35DE', 'VK56DE', 'VQ40DE', 'QR25DE'],
        'B': ['KA24DE', 'SR20DE', 'VQ35HR', 'MR18DE', 'QR25DE'],
        'C': ['SR20DE', 'VG30DETT', 'QG18DE'],
        'D': ['KA24DE', 'QG18DE', 'VQ35DE'],
        'E': ['VE30DE', 'GA16DE', 'VG33E'],
        'F': 'KA24E',
        'H': 'VG30E',
        'M': ['KA24DE', 'VG33ER'],
        'N': 'VH45DE',
        'R': 'VG30DE',
        'S': 'KA24E',
        'T': 'VG33E',
    })

    plant = Detail(('vis', 1), {
        'C': 'Smyrna',
github idlesign / vininfo / vininfo / details / avtovaz.py View on Github external
class AvtoVazDetails(VinDetails):
    """AvtoVAZ VIN details extractor."""

    model = Detail(('vds', 1), {
        'A': 'XRAY',
        'F': 'Vesta',
    })

    body = Detail(('vds', 2), {
        'B': BODY_HATCH_5,
        'K': BODY_SW_5,
        'L': BODY_SEDAN_4,
    })

    engine = Detail(('vds', 3), {
        '1': '21129',
        '2': '11189',
        '3': '21179',
        '4': 'H4M',
        'A': '21129 CNG',
    })

    plant = Detail(('vis', 1), {
        '0': 'Tolyatti',
        'Y': 'Izhevsk',
    })

    transmission = Detail(('vds', 4), {
        '1': 'Manual, 5-Gear (VAZ 21807)',
        '2': 'Semi-automatic, 5-Gear (VAZ 21827)',
        '3': 'Manual, 5-Gear (Renault JH3 514)',
github idlesign / vininfo / vininfo / details / avtovaz.py View on Github external
body = Detail(('vds', 2), {
        'B': BODY_HATCH_5,
        'K': BODY_SW_5,
        'L': BODY_SEDAN_4,
    })

    engine = Detail(('vds', 3), {
        '1': '21129',
        '2': '11189',
        '3': '21179',
        '4': 'H4M',
        'A': '21129 CNG',
    })

    plant = Detail(('vis', 1), {
        '0': 'Tolyatti',
        'Y': 'Izhevsk',
    })

    transmission = Detail(('vds', 4), {
        '1': 'Manual, 5-Gear (VAZ 21807)',
        '2': 'Semi-automatic, 5-Gear (VAZ 21827)',
        '3': 'Manual, 5-Gear (Renault JH3 514)',
    })

    serial = Detail(('vis', slice(2, None)))
github idlesign / vininfo / vininfo / details / avtovaz.py View on Github external
})

    engine = Detail(('vds', 3), {
        '1': '21129',
        '2': '11189',
        '3': '21179',
        '4': 'H4M',
        'A': '21129 CNG',
    })

    plant = Detail(('vis', 1), {
        '0': 'Tolyatti',
        'Y': 'Izhevsk',
    })

    transmission = Detail(('vds', 4), {
        '1': 'Manual, 5-Gear (VAZ 21807)',
        '2': 'Semi-automatic, 5-Gear (VAZ 21827)',
        '3': 'Manual, 5-Gear (Renault JH3 514)',
    })

    serial = Detail(('vis', slice(2, None)))