Skip to main content

elgarde-inspection

A structured pre-purchase used-car inspection as data plus a small pure-Python implementation: a multilingual checklist, curated model-specific known defects, and the 1–5 scoring rules that turn answers into one verdict.

No dependencies, no network calls, no configuration. This is the same canon that powers the Elgarde app and its free API, and it passes the same conformance vectors as every other port.

pip install elgarde-inspection

Use

from elgarde_inspection import Car, assemble, all_items, localize, overall, progress

groups = assemble(Car(make="Volkswagen", model="Golf", fuel_type="diesel"))
[g["id"] for g in groups]
# ['ext', 'int', 'eng', 'road', 'docs', 'fuel.diesel', 'defects']

len(all_items(groups))
# 33  — 25 base items, 3 diesel-specific, 5 known VAG weak points

The checklist adapts to the car: a diesel gets DPF and glow-plug items, an EV gets state-of-health and charging items, and a recognised model gets its documented weak points — the DQ200 dry clutch, the PureTech wet belt, the N47 timing chain.

Read it in one language

for group in localize(groups, "pt"):
    print(group["title"])
    for child in group.get("children", []):
        for item in child.get("items", []):
            print("  ", item["prompt"], "(critical)" if item["critical"] else "")

Content is authored in English, Portuguese, Russian, Ukrainian and French; defect text in English and Portuguese, falling back to English.

Score an inspection

Answers are 15, or -1 for not applicable and -2 for not inspected. Omit an item to leave it unanswered.

scores = {item["id"]: 5 for item in all_items(groups)}
scores["docs.all.mileage"] = 1          # odometer does not match the records

overall(groups, scores)                 # 1.0
progress(groups, scores)                # (33, 33)

The average was 4.86. A critical item scoring at or below 2 clamps the verdict down to that score, because a car with good averages and a failed safety or provenance check is not a good car. That clamp only ever lowers the verdict, and an unanswered critical item has no effect.

Group rollups are average, weighted (by item["weight"]) or worst_case, per group. The full algorithm is written down in spec/SCORING.md.

Just the known defects

from elgarde_inspection import match_defect_rule

rule = match_defect_rule("Peugeot", "208")
[(d["id"], d.get("critical", False)) for d in rule["defects"]]
# [('puretech.wetbelt', True), ('ep6.chain', False), ('hdi.turbo', False)]

None means nothing is curated for that model yet — not that the model is trouble-free.

Honest limits

Elgarde is a self-service checklist. It is not a certified, mechanical or legal inspection, not professional advice, and not a vehicle-history or title service. A defect entry describes a known weak point on a model — something worth checking — and is never a claim about any individual car.

Licence

Code MIT; the inspection data is CC-BY-4.0 — attribution to https://elgarde.com/ is the only condition.

Source, the canon, and the conformance suite: https://github.com/ElgardeCom/elgarde

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

elgarde_inspection-1.0.0.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

elgarde_inspection-1.0.0-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file elgarde_inspection-1.0.0.tar.gz.

File metadata

  • Download URL: elgarde_inspection-1.0.0.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for elgarde_inspection-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a18ecfb04e52aa1b674e8a37159ff91664b0e001b57cfe5b0436fb37d978bac7
MD5 71667f27a9b0baf356b1f9ee8510e8fa
BLAKE2b-256 4aa864a3664c588779677835bf985ed3e197d6a3eea7df2eaa17ec96ba9ca2b3

See more details on using hashes here.

File details

Details for the file elgarde_inspection-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for elgarde_inspection-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 17559567197a15ebfba308484c6a46bf82f8cc281a70eff57003e7f6649fec11
MD5 17216d2632ba1b3b780ec37a2b60a4aa
BLAKE2b-256 3e6eb6e5df8d0347153ef757645f7c0f78420183ca5db257b5b01eb50983f2d0

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page