vpndetection-fastapi 2.0.4__tar.gz → 2.0.6__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.
@@ -34,3 +34,30 @@ jobs:
34
34
  - run: pytest
35
35
  - run: python -m build
36
36
  - uses: pypa/gh-action-pypi-publish@release/v1
37
+
38
+ # This version's section of CHANGELOG.md, as the tag's GitHub Release. It
39
+ # waits for the publish, so no release page names a version the registry
40
+ # cannot serve, and a re-run edits the release rather than failing on it.
41
+ github-release:
42
+ needs: publish
43
+ runs-on: ubuntu-latest
44
+ permissions:
45
+ contents: write
46
+ steps:
47
+ - uses: actions/checkout@v7
48
+ - name: GitHub Release from CHANGELOG.md
49
+ env:
50
+ GH_TOKEN: ${{ github.token }}
51
+ GH_REPO: ${{ github.repository }}
52
+ run: |
53
+ version="${GITHUB_REF_NAME#v}"
54
+ awk -v v="$version" '/^## /{ if (found) exit; found = ($2 == v); next } found' CHANGELOG.md > notes.md
55
+ if ! grep -q '^### ' notes.md ; then
56
+ echo "CHANGELOG.md has no section for ${version}" >&2
57
+ exit 1
58
+ fi
59
+ if gh release view "$GITHUB_REF_NAME" > /dev/null 2>&1 ; then
60
+ gh release edit "$GITHUB_REF_NAME" --notes-file notes.md
61
+ else
62
+ gh release create "$GITHUB_REF_NAME" --title "$GITHUB_REF_NAME" --notes-file notes.md --verify-tag
63
+ fi
@@ -0,0 +1,15 @@
1
+ # Changelog
2
+
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
+
5
+ ## 2.0.6 - 2026-09-27
6
+
7
+ ### Features
8
+
9
+ - Require vpndetection 5.5.0: OauthMetadata carries client_id_metadata_document_supported ([`21a3979`](https://github.com/vpndetection-io/sdk-python-fastapi/commit/21a3979ec7ed49fb55e88e0a16a32ccefc0bf61f))
10
+
11
+ ## 2.0.5 - 2026-09-25
12
+
13
+ ### Fixes
14
+
15
+ - Raise the base floor to vpndetection 5.4.2 ([`fb4525a`](https://github.com/vpndetection-io/sdk-python-fastapi/commit/fb4525a2d8ab530939a3a157675c937fd22cf71a))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: vpndetection-fastapi
3
- Version: 2.0.4
3
+ Version: 2.0.6
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,14 +20,14 @@ 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.4.1
23
+ Requires-Dist: vpndetection<6,>=5.5.0
24
24
  Provides-Extra: dev
25
25
  Requires-Dist: mypy>=1.11; extra == 'dev'
26
26
  Requires-Dist: pytest>=8; extra == 'dev'
27
27
  Requires-Dist: ruff>=0.6; extra == 'dev'
28
28
  Description-Content-Type: text/markdown
29
29
 
30
- # [<img src="https://s3.vpndetection.io/vpndetection-public/brand/mark.svg" alt="VPNDetection" width="24"/>](https://vpndetection.io/) VPNDetection FastAPI Middleware
30
+ # [<img src="https://s3.vpndetection.io/vpndetection-public/brand/mark.svg" alt="VPNDetection" height="28"/>](https://vpndetection.io/) VPNDetection FastAPI Middleware
31
31
 
32
32
  [![PyPI](https://img.shields.io/pypi/v/vpndetection-fastapi.svg)](https://pypi.org/project/vpndetection-fastapi/)
33
33
  [![license](https://img.shields.io/pypi/l/vpndetection-fastapi.svg)](LICENSE)
@@ -99,7 +99,7 @@ By default the middleware uses `request.client.host`, which is the socket peer u
99
99
  For an edge that writes the address into its own header, name the header:
100
100
 
101
101
  ```python
102
- from python_fastapi import header_ip_selector
102
+ from vpndetection_fastapi import header_ip_selector
103
103
 
104
104
  ip_selector = header_ip_selector("CF-Connecting-IP") # or True-Client-IP, or your own
105
105
  ```
@@ -144,7 +144,7 @@ There are official VPNDetection client libraries available for many languages in
144
144
 
145
145
  VPN Detection API: Accurate anonymity detection identifying VPNs, residential proxies, hosting servers, Tor nodes, CDNs, relays and more.
146
146
 
147
- [<img src="https://s3.vpndetection.io/vpndetection-public/brand/mark.svg" alt="VPNDetection" width="96"/>](https://vpndetection.io/)
147
+ [<img src="https://s3.vpndetection.io/vpndetection-public/brand/mark.svg" alt="VPNDetection" height="64"/>](https://vpndetection.io/)
148
148
 
149
149
  ## License
150
150
 
@@ -1,4 +1,4 @@
1
- # [<img src="https://s3.vpndetection.io/vpndetection-public/brand/mark.svg" alt="VPNDetection" width="24"/>](https://vpndetection.io/) VPNDetection FastAPI Middleware
1
+ # [<img src="https://s3.vpndetection.io/vpndetection-public/brand/mark.svg" alt="VPNDetection" height="28"/>](https://vpndetection.io/) VPNDetection FastAPI Middleware
2
2
 
3
3
  [![PyPI](https://img.shields.io/pypi/v/vpndetection-fastapi.svg)](https://pypi.org/project/vpndetection-fastapi/)
4
4
  [![license](https://img.shields.io/pypi/l/vpndetection-fastapi.svg)](LICENSE)
@@ -70,7 +70,7 @@ By default the middleware uses `request.client.host`, which is the socket peer u
70
70
  For an edge that writes the address into its own header, name the header:
71
71
 
72
72
  ```python
73
- from python_fastapi import header_ip_selector
73
+ from vpndetection_fastapi import header_ip_selector
74
74
 
75
75
  ip_selector = header_ip_selector("CF-Connecting-IP") # or True-Client-IP, or your own
76
76
  ```
@@ -115,7 +115,7 @@ There are official VPNDetection client libraries available for many languages in
115
115
 
116
116
  VPN Detection API: Accurate anonymity detection identifying VPNs, residential proxies, hosting servers, Tor nodes, CDNs, relays and more.
117
117
 
118
- [<img src="https://s3.vpndetection.io/vpndetection-public/brand/mark.svg" alt="VPNDetection" width="96"/>](https://vpndetection.io/)
118
+ [<img src="https://s3.vpndetection.io/vpndetection-public/brand/mark.svg" alt="VPNDetection" height="64"/>](https://vpndetection.io/)
119
119
 
120
120
  ## License
121
121
 
@@ -24,7 +24,7 @@ classifiers = [
24
24
  "Topic :: Security",
25
25
  "Typing :: Typed",
26
26
  ]
27
- dependencies = ["vpndetection>=5.4.1,<6", "starlette>=0.37"]
27
+ dependencies = ["vpndetection>=5.5.0,<6", "starlette>=0.37"]
28
28
 
29
29
  [project.urls]
30
30
  Homepage = "https://vpndetection.io"
@@ -39,7 +39,7 @@ __all__ = [
39
39
  "xff_ip_selector",
40
40
  ]
41
41
 
42
- __version__ = "2.0.4"
42
+ __version__ = "2.0.6"
43
43
 
44
44
  _SELECTORS: Selectors[Request] = bind_selectors(
45
45
  lambda request: RequestView(
@@ -5385,7 +5385,7 @@
5385
5385
  ]
5386
5386
  },
5387
5387
  "oauth": {
5388
- "why": "The public OAuth accessor (docs/sdk/oauth.md). Arguments use the canonical parameter names; form fields and response members are WIRE names, mapped by each SDK exactly as it maps any other response. mslm:apikey_id and mslm:apikey surface as apikey_id and apikey.",
5388
+ "why": "The public OAuth accessor. Arguments use the canonical parameter names; form fields and response members are WIRE names, mapped by each SDK exactly as it maps any other response. mslm:apikey_id and mslm:apikey surface as apikey_id and apikey.",
5389
5389
  "endpoints": {
5390
5390
  "metadata": {
5391
5391
  "method": "GET",
@@ -6445,11 +6445,77 @@
6445
6445
  5
6446
6446
  ]
6447
6447
  }
6448
+ },
6449
+ {
6450
+ "name": "interval-past-the-deadline-sleeps-only-to-it",
6451
+ "clientId": "vpndetection-cli",
6452
+ "device": {
6453
+ "device_code": "mo_dc_poll",
6454
+ "user_code": "BCDF-GHJK",
6455
+ "verification_uri": "https://app.vpndetection.io/device",
6456
+ "verification_uri_complete": "https://app.vpndetection.io/device?user_code=BCDF-GHJK",
6457
+ "expires_in": 2,
6458
+ "interval": 2147483647
6459
+ },
6460
+ "why": "A sleep that would end past the local deadline ends at it, and the local expiry follows with no request sent: the outcome the full sleep reaches anyway, without asking the runtime for a sleep it may not hold (.NET's Task.Delay throws past ~49.7 days). 2147483647 is the largest interval every SDK's type holds.",
6461
+ "responses": [
6462
+ {
6463
+ "status": 400,
6464
+ "body": {
6465
+ "error": "authorization_pending"
6466
+ }
6467
+ }
6468
+ ],
6469
+ "expect": {
6470
+ "outcome": "expiredToken",
6471
+ "requests": 0,
6472
+ "waits": [
6473
+ 2
6474
+ ],
6475
+ "status": null
6476
+ }
6477
+ },
6478
+ {
6479
+ "name": "slow-down-past-the-deadline-sleeps-only-to-it",
6480
+ "clientId": "vpndetection-cli",
6481
+ "device": {
6482
+ "device_code": "mo_dc_poll",
6483
+ "user_code": "BCDF-GHJK",
6484
+ "verification_uri": "https://app.vpndetection.io/device",
6485
+ "verification_uri_complete": "https://app.vpndetection.io/device?user_code=BCDF-GHJK",
6486
+ "expires_in": 8,
6487
+ "interval": 1
6488
+ },
6489
+ "why": "The cut applies to every sleep, a widened one included: 1, then 6 after the first slow_down, then only the 1 s left of the 8 rather than 11.",
6490
+ "responses": [
6491
+ {
6492
+ "status": 400,
6493
+ "body": {
6494
+ "error": "slow_down"
6495
+ }
6496
+ },
6497
+ {
6498
+ "status": 400,
6499
+ "body": {
6500
+ "error": "slow_down"
6501
+ }
6502
+ }
6503
+ ],
6504
+ "expect": {
6505
+ "outcome": "expiredToken",
6506
+ "requests": 2,
6507
+ "waits": [
6508
+ 1,
6509
+ 6,
6510
+ 1
6511
+ ],
6512
+ "status": null
6513
+ }
6448
6514
  }
6449
6515
  ]
6450
6516
  },
6451
6517
  "deferred": {
6452
- "why": "Vectors for authorizationUrl, exchangeAuthorizationCode, createPkce and pkceChallenge, which ship only once the server can complete the authorization-code flow (docs/sdk/oauth.md, Deferred). A device-flow runner never reads this key; nothing outside it names a deferred operation. emit.mjs still verifies these vectors so they are right when the methods ship.",
6518
+ "why": "Vectors for authorizationUrl, exchangeAuthorizationCode, createPkce and pkceChallenge, which ship only once the server can complete the authorization-code flow. A device-flow runner never reads this key; nothing outside it names a deferred operation. emit.mjs still verifies these vectors so they are right when the methods ship.",
6453
6519
  "pkce": {
6454
6520
  "why": "RFC 7636 Appendix B. A generated verifier is 32 CSPRNG bytes as unpadded base64url.",
6455
6521
  "verifier": "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk",