cardog 2.3.0__tar.gz → 2.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cardog-2.3.0 → cardog-2.4.0}/CHANGELOG.md +24 -5
- {cardog-2.3.0 → cardog-2.4.0}/PKG-INFO +1 -1
- {cardog-2.3.0 → cardog-2.4.0}/openapi/openapi.v2.json +5 -3
- {cardog-2.3.0 → cardog-2.4.0}/pyproject.toml +1 -1
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/_constants.py +1 -1
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/v2/_api_version.py +2 -2
- {cardog-2.3.0 → cardog-2.4.0}/tests/v2/test_v2_urls.py +2 -2
- {cardog-2.3.0 → cardog-2.4.0}/tests/v2/test_v2_version.py +7 -6
- {cardog-2.3.0 → cardog-2.4.0}/.gitignore +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/Makefile +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/README.md +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/scripts/generate.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/__init__.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/_async_client.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/_base_client.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/_client.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/_credits.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/_exceptions.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/_versioning.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/py.typed +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/resources/__init__.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/resources/charging.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/resources/complaints.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/resources/efficiency.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/resources/fuel.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/resources/history.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/resources/listings.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/resources/locations.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/resources/market.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/resources/recalls.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/resources/research.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/resources/safety.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/resources/vin.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/types/__init__.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/types/charging.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/types/common.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/types/complaints.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/types/efficiency.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/types/fuel.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/types/history.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/types/listings.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/types/locations.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/types/market.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/types/recalls.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/types/research.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/types/safety.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/types/vin.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/v2/__init__.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/v2/_support.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/v2/charging.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/v2/entities.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/v2/feedback.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/v2/feeds.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/v2/instruments.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/v2/listings.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/v2/platform.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/v2/quotes.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/v2/recalls.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/v2/safety.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/v2/specs.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/v2/tape.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/v2/types.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/src/cardog/v2/vin.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/tests/__init__.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/tests/conftest.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/tests/test_client.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/tests/test_contracts_async.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/tests/test_contracts_charging.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/tests/test_contracts_complaints.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/tests/test_contracts_efficiency.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/tests/test_contracts_fuel.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/tests/test_contracts_listings.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/tests/test_contracts_locations.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/tests/test_contracts_market.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/tests/test_contracts_recalls.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/tests/test_contracts_research.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/tests/test_contracts_safety.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/tests/test_contracts_vin.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/tests/v2/__init__.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/tests/v2/spec_fixtures.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/tests/v2/test_v2_async.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/tests/v2/test_v2_credits.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/tests/v2/test_v2_errors.py +0 -0
- {cardog-2.3.0 → cardog-2.4.0}/tests/v2/test_v2_live_smoke.py +0 -0
|
@@ -2,11 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to the Cardog Python SDK will be documented in this file.
|
|
4
4
|
|
|
5
|
-
The SDK's
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
The SDK's version follows the API version it pins. A release that pins a
|
|
6
|
+
new API date is a major, so a range like `cardog>=2.4,<3` never crosses a
|
|
7
|
+
breaking API version; additive changes are minors and fixes are patches. The major
|
|
8
|
+
is never below the API's path major (`/v2` → 2). The first pin, 2.4.0, was
|
|
9
|
+
a minor. Before general availability a contract change inside API 2.x was
|
|
10
|
+
a minor bump that named the API pre-release it tracked. 3.0.0, published
|
|
11
|
+
to PyPI on 2026-09-28, broke that rule and is yanked: `pip install cardog`
|
|
12
|
+
no longer resolves to it, and a pin on `==3.0.0` still installs. Everything
|
|
13
|
+
it carried is in 2.1.0.
|
|
14
|
+
|
|
15
|
+
## [2.4.0] - 2026-10-21
|
|
16
|
+
|
|
17
|
+
Pins API `2026-10-21`, the general availability of API 2.0 (CRDG-4356).
|
|
18
|
+
The response shapes are the ones 2.3.0 parses (2.0.0-rc.8), so nothing else
|
|
19
|
+
changes.
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- `cardog.PINNED_API_VERSION` is `"2026-10-21"`, and every v2 request now
|
|
24
|
+
sends `Cardog-Version: 2026-10-21`. `KNOWN_API_VERSIONS` is
|
|
25
|
+
`("2026-10-21",)`.
|
|
26
|
+
- The vendored OpenAPI document reports `info.version` `2026-10-21`.
|
|
27
|
+
- A release that pins a new API date from here on is a major: the next
|
|
28
|
+
breaking API version ships as 3.0.0.
|
|
10
29
|
|
|
11
30
|
## [2.3.0] - 2026-10-15
|
|
12
31
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: cardog
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.4.0
|
|
4
4
|
Summary: Python SDK for the Cardog API — Canadian VIN decode, vehicle specs, live listings, market quotes, and Transport Canada + NHTSA recalls.
|
|
5
5
|
Project-URL: Homepage, https://cardog.app
|
|
6
6
|
Project-URL: Documentation, https://cardog.app/docs
|
|
@@ -2,15 +2,17 @@
|
|
|
2
2
|
"openapi": "3.0.3",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Cardog API v2",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "2026-10-21",
|
|
6
6
|
"description": "VIN identity, canonical specs, live market data, and recalls — one key.\n\n**The ref is the API.** Every parameter is an entity ref (`make:tesla`, `model-year:honda/cr-v/2026`) or a VIN; every response carries refs plus `links` to adjacent resources. Free text is accepted in exactly one place — `GET /v2/entities/resolve` — and returns refs with confidence, never silently fuzzed results.\n\n**Errors are instructions.** Every non-2xx body is the ErrorEnvelope: `code`, `message`, `hint`, `docs_url`, the offending `refs` named, and nearest-ref `suggestions` where computable.\n\n**Price is machine-readable.** `GET /v2/pricing` is the live rate card; every metered response carries `X-Credits-*` headers.",
|
|
7
7
|
"contact": {
|
|
8
8
|
"name": "Cardog",
|
|
9
9
|
"url": "https://cardog.app",
|
|
10
10
|
"email": "api@cardog.io"
|
|
11
11
|
},
|
|
12
|
-
"x-cardog-api-versions": [
|
|
13
|
-
|
|
12
|
+
"x-cardog-api-versions": [
|
|
13
|
+
"2026-10-21"
|
|
14
|
+
],
|
|
15
|
+
"x-cardog-latest-version": "2026-10-21"
|
|
14
16
|
},
|
|
15
17
|
"servers": [
|
|
16
18
|
{
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "cardog"
|
|
7
|
-
version = "2.
|
|
7
|
+
version = "2.4.0"
|
|
8
8
|
description = "Python SDK for the Cardog API — Canadian VIN decode, vehicle specs, live listings, market quotes, and Transport Canada + NHTSA recalls."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
@@ -9,7 +9,7 @@ from __future__ import annotations
|
|
|
9
9
|
from typing import Optional, Tuple
|
|
10
10
|
|
|
11
11
|
#: The dated contract versions the API served when this SDK was generated.
|
|
12
|
-
KNOWN_API_VERSIONS: Tuple[str, ...] = ()
|
|
12
|
+
KNOWN_API_VERSIONS: Tuple[str, ...] = ('2026-10-21',)
|
|
13
13
|
|
|
14
14
|
#: Sent as ``Cardog-Version`` on every v2 request unless ``api_version`` overrides it.
|
|
15
|
-
PINNED_API_VERSION: Optional[str] =
|
|
15
|
+
PINNED_API_VERSION: Optional[str] = '2026-10-21'
|
|
@@ -230,8 +230,8 @@ def test_headers_api_key_and_sdk_version(httpx_mock, client):
|
|
|
230
230
|
client.v2.recalls.stats()
|
|
231
231
|
request = httpx_mock.get_requests()[-1]
|
|
232
232
|
assert request.headers["x-api-key"] == "crdg_test"
|
|
233
|
-
assert request.headers["x-cardog-sdk-version"] == "2.
|
|
234
|
-
assert request.headers["user-agent"] == "cardog-python/2.
|
|
233
|
+
assert request.headers["x-cardog-sdk-version"] == "2.4.0"
|
|
234
|
+
assert request.headers["user-agent"] == "cardog-python/2.4.0"
|
|
235
235
|
|
|
236
236
|
|
|
237
237
|
def test_unauthenticated_client_sends_no_api_key(httpx_mock):
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
Every v2 request carries ``Cardog-Version``: the ``api_version`` the client
|
|
4
4
|
was built with, else ``PINNED_API_VERSION`` (generated from the vendored
|
|
5
5
|
OpenAPI document), else nothing. Before the API's general availability the
|
|
6
|
-
pin
|
|
6
|
+
pin was ``None`` and a default client sent no version; from GA it is the GA
|
|
7
|
+
date.
|
|
7
8
|
"""
|
|
8
9
|
|
|
9
10
|
from __future__ import annotations
|
|
@@ -34,15 +35,15 @@ def test_the_pin_is_generated_from_the_vendored_spec():
|
|
|
34
35
|
assert list(KNOWN_API_VERSIONS) == info["x-cardog-api-versions"]
|
|
35
36
|
|
|
36
37
|
|
|
37
|
-
def
|
|
38
|
-
assert KNOWN_API_VERSIONS ==
|
|
39
|
-
assert PINNED_API_VERSION
|
|
38
|
+
def test_the_pin_is_the_newest_date_ga_day_at_first():
|
|
39
|
+
assert KNOWN_API_VERSIONS[0] == "2026-10-21"
|
|
40
|
+
assert PINNED_API_VERSION == KNOWN_API_VERSIONS[-1]
|
|
40
41
|
|
|
41
42
|
|
|
42
|
-
def
|
|
43
|
+
def test_a_default_client_sends_the_pinned_date(httpx_mock, client):
|
|
43
44
|
httpx_mock.add_response(json=minimal_component("VinIdentity"))
|
|
44
45
|
client.v2.vin.get_by_vin(VIN)
|
|
45
|
-
assert "cardog-version"
|
|
46
|
+
assert httpx_mock.get_request().headers["cardog-version"] == PINNED_API_VERSION
|
|
46
47
|
|
|
47
48
|
|
|
48
49
|
def test_api_version_rides_every_v2_request(httpx_mock):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|