vpndetection-fastapi 2.1.3__tar.gz → 2.1.4__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.
@@ -2,6 +2,12 @@
2
2
 
3
3
  What each release changed for you, newest first. Each line is a commit's summary, linked to its full description and diff. Releases before 2.0.5 are described by their release commits.
4
4
 
5
+ ## 2.1.4 - 2026-10-15
6
+
7
+ ### Fixes
8
+
9
+ - Require vpndetection 5.7.2: Retry-After, the key, the base URL and unreadable answers ([`4d74c45`](https://github.com/vpndetection-io/sdk-python-fastapi/commit/4d74c456bb11419cb181d5f7c911913a84398ca3))
10
+
5
11
  ## 2.1.3 - 2026-10-10
6
12
 
7
13
  ### Fixes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: vpndetection-fastapi
3
- Version: 2.1.3
3
+ Version: 2.1.4
4
4
  Summary: Official FastAPI and Starlette middleware for the VPNDetection API. Detect VPNs, proxies, Tor, hosting and CDN visitors on every request.
5
5
  Project-URL: Homepage, https://vpndetection.io
6
6
  Project-URL: Source, https://github.com/vpndetection-io/sdk-python-fastapi
@@ -20,7 +20,7 @@ Classifier: Topic :: Security
20
20
  Classifier: Typing :: Typed
21
21
  Requires-Python: >=3.11
22
22
  Requires-Dist: starlette>=0.37
23
- Requires-Dist: vpndetection<6,>=5.7.1
23
+ Requires-Dist: vpndetection<6,>=5.7.2
24
24
  Provides-Extra: dev
25
25
  Requires-Dist: fastapi>=0.115; extra == 'dev'
26
26
  Requires-Dist: mypy>=1.11; extra == 'dev'
@@ -24,7 +24,7 @@ classifiers = [
24
24
  "Topic :: Security",
25
25
  "Typing :: Typed",
26
26
  ]
27
- dependencies = ["vpndetection>=5.7.1,<6", "starlette>=0.37"]
27
+ dependencies = ["vpndetection>=5.7.2,<6", "starlette>=0.37"]
28
28
 
29
29
  [project.urls]
30
30
  Homepage = "https://vpndetection.io"
@@ -45,7 +45,7 @@ __all__ = [
45
45
  "xff_ip_selector",
46
46
  ]
47
47
 
48
- __version__ = "2.1.3"
48
+ __version__ = "2.1.4"
49
49
 
50
50
  # Set on a request ``skip`` claimed, so block_if can tell it from one the middleware
51
51
  # never saw.
@@ -8,6 +8,7 @@ to arrive wearing a public address, through a selector.
8
8
  from __future__ import annotations
9
9
 
10
10
  import json
11
+ import os
11
12
  import pathlib
12
13
  from typing import Any
13
14
 
@@ -359,3 +360,18 @@ def test_corpus_conditions_through_block_if(case: dict[str, Any]) -> None:
359
360
  assert len(reported) == (1 if case["expect"]["missing"] else 0), case["why"]
360
361
  for member in case["expect"]["missing"]:
361
362
  assert member in reported[0], case["why"]
363
+
364
+
365
+ # Built exactly as the README builds it: an API key and nothing else. Every other test hands
366
+ # the middleware a client, so none of them could see a core that cannot start from a key
367
+ # alone. The test client's loopback peer is a bogon, answered with no request.
368
+ def test_the_middleware_starts_the_way_the_readme_builds_it(
369
+ monkeypatch: pytest.MonkeyPatch,
370
+ ) -> None:
371
+ monkeypatch.setenv("VPNDETECTION_API_KEY", "a-key")
372
+ status, body = get(app_with(api_key=os.environ["VPNDETECTION_API_KEY"]))
373
+
374
+ assert status == 200
375
+ assert body["attached"] is True
376
+ assert body["is_bogon"] is True
377
+ assert body["error"] is None