amazon-subscriptions 1.1.0__tar.gz → 1.1.1__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.
Files changed (82) hide show
  1. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/.github/workflows/automerge-schedule.yml +5 -5
  2. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/.github/workflows/lint.yml +6 -6
  3. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/.github/workflows/pr-conventional-title.yml +1 -1
  4. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/.github/workflows/publish.yml +5 -2
  5. amazon_subscriptions-1.1.0/.github/workflows/mr-test.yml → amazon_subscriptions-1.1.1/.github/workflows/test.yml +67 -9
  6. amazon_subscriptions-1.1.1/.github/zizmor.yml +9 -0
  7. amazon_subscriptions-1.1.1/.qlty/.gitignore +7 -0
  8. amazon_subscriptions-1.1.1/.qlty/qlty.toml +97 -0
  9. amazon_subscriptions-1.1.1/.release-please-manifest.json +3 -0
  10. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/CHANGELOG.md +9 -5
  11. amazon_subscriptions-1.1.0/README.md → amazon_subscriptions-1.1.1/PKG-INFO +50 -13
  12. amazon_subscriptions-1.1.0/PKG-INFO → amazon_subscriptions-1.1.1/README.md +30 -26
  13. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/amazon_subscriptions/cli.py +15 -65
  14. amazon_subscriptions-1.1.1/amazon_subscriptions/client.py +233 -0
  15. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/amazon_subscriptions/locales/__init__.py +4 -5
  16. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/amazon_subscriptions/locales/en.py +4 -4
  17. amazon_subscriptions-1.1.1/amazon_subscriptions/pages.py +264 -0
  18. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/amazon_subscriptions/parse/__init__.py +10 -1
  19. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/amazon_subscriptions/parse/deliveries.py +32 -4
  20. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/amazon_subscriptions/parse/matching.py +23 -0
  21. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/amazon_subscriptions/parse/product.py +3 -38
  22. amazon_subscriptions-1.1.1/amazon_subscriptions/parse/widget.py +68 -0
  23. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/amazon_subscriptions/serialize.py +4 -0
  24. amazon_subscriptions-1.1.1/amazon_subscriptions/text.py +60 -0
  25. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/codecov.yml +1 -1
  26. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/mise.toml +2 -2
  27. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/pyproject.toml +17 -8
  28. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/release-please-config.json +3 -2
  29. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/renovate.json +2 -2
  30. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/scripts/anonymize_fixtures.py +2 -189
  31. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/scripts/extract_product_fixture.py +45 -96
  32. amazon_subscriptions-1.1.1/scripts/fixture_html.py +86 -0
  33. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/scripts/privacy_scan.py +26 -19
  34. amazon_subscriptions-1.1.1/scripts/subscriptions_anonymizer.py +197 -0
  35. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/tests/conftest.py +27 -22
  36. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/tests/test_cli.py +35 -11
  37. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/tests/test_client.py +91 -5
  38. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/tests/test_locale.py +1 -1
  39. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/tests/test_parse_deliveries.py +31 -1
  40. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/tests/test_parse_product.py +20 -1
  41. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/tests/test_serialize.py +4 -0
  42. amazon_subscriptions-1.1.1/tests/test_text.py +38 -0
  43. amazon_subscriptions-1.1.1/uv.lock +972 -0
  44. amazon_subscriptions-1.1.0/.release-please-manifest.json +0 -3
  45. amazon_subscriptions-1.1.0/amazon_subscriptions/client.py +0 -485
  46. amazon_subscriptions-1.1.0/uv.lock +0 -976
  47. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/.github/workflows/release-please.yml +0 -0
  48. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/.gitignore +0 -0
  49. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/.markdownlint-cli2.yaml +0 -0
  50. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/.yamllint.yml +0 -0
  51. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/CONTRIBUTING.md +0 -0
  52. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/LICENSE +0 -0
  53. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/amazon_subscriptions/__init__.py +0 -0
  54. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/amazon_subscriptions/dates.py +0 -0
  55. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/amazon_subscriptions/exceptions.py +0 -0
  56. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/amazon_subscriptions/locales/base.py +0 -0
  57. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/amazon_subscriptions/models.py +0 -0
  58. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/amazon_subscriptions/parse/acp.py +0 -0
  59. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/amazon_subscriptions/parse/detail.py +0 -0
  60. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/amazon_subscriptions/parse/selectors.py +0 -0
  61. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/amazon_subscriptions/parse/subscriptions.py +0 -0
  62. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/amazon_subscriptions/parse/util.py +0 -0
  63. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/lychee.toml +0 -0
  64. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/scripts/vendor/README.md +0 -0
  65. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/scripts/vendor/anonymize_test_resources.py +0 -0
  66. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/tests/__init__.py +0 -0
  67. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/tests/fixtures/de/deliveries-page-2.html +0 -0
  68. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/tests/fixtures/de/delivery-1.html +0 -0
  69. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/tests/fixtures/de/delivery-2.html +0 -0
  70. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/tests/fixtures/de/landing.html +0 -0
  71. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/tests/fixtures/de/product-alternative-offer.html +0 -0
  72. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/tests/fixtures/de/product-no-buybox.html +0 -0
  73. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/tests/fixtures/de/product-rrp.html +0 -0
  74. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/tests/fixtures/de/product-single-offer.html +0 -0
  75. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/tests/fixtures/de/product-unavailable.html +0 -0
  76. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/tests/fixtures/de/product-was.html +0 -0
  77. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/tests/fixtures/de/product.html +0 -0
  78. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/tests/fixtures/de/subscription-detail.html +0 -0
  79. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/tests/test_dates.py +0 -0
  80. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/tests/test_matching.py +0 -0
  81. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/tests/test_parse_detail.py +0 -0
  82. {amazon_subscriptions-1.1.0 → amazon_subscriptions-1.1.1}/tests/test_parse_subscriptions.py +0 -0
@@ -15,11 +15,12 @@ jobs:
15
15
  - name: Enable auto-merge on release-please PR
16
16
  env:
17
17
  GH_TOKEN: ${{ secrets.OVERRIDE_TOKEN }}
18
+ GH_REPO: ${{ github.repository }}
19
+ BASE_BRANCH: ${{ github.event.repository.default_branch }}
18
20
  run: |
19
21
  PRS=$(gh pr list \
20
- --repo "${{ github.repository }}" \
21
22
  --label "autorelease: pending" \
22
- --base "${{ github.event.repository.default_branch }}" \
23
+ --base "$BASE_BRANCH" \
23
24
  --state open \
24
25
  --json number)
25
26
 
@@ -35,9 +36,8 @@ jobs:
35
36
  if [ -n "$PR" ]; then
36
37
  # Auto-merge waits for the branch to be up to date with main, and release-please leaves it
37
38
  # behind when the new commits don't change the release notes.
38
- gh pr update-branch "$PR" --repo "${{ github.repository }}"
39
- gh pr merge "$PR" --auto --squash --delete-branch \
40
- --repo "${{ github.repository }}"
39
+ gh pr update-branch "$PR"
40
+ gh pr merge "$PR" --auto --squash --delete-branch
41
41
  echo "Auto-merge enabled on PR #$PR"
42
42
  else
43
43
  echo "No open release-please PR found"
@@ -2,13 +2,13 @@
2
2
  name: Lint
3
3
 
4
4
  on:
5
- # Called by mr-test.yml, so its required job covers the linters too.
5
+ # Called by test.yml, so its required job covers the linters too.
6
6
  workflow_call:
7
7
 
8
8
  permissions:
9
9
  contents: read
10
10
 
11
- # Python is linted in mr-test.yml. Each linter here is its own job so a failure names the file type. The linters'
11
+ # Python is linted in test.yml. Each linter here is its own job so a failure names the file type. The linters'
12
12
  # versions are in mise.toml, where Renovate updates them.
13
13
  jobs:
14
14
  markdown:
@@ -19,7 +19,7 @@ jobs:
19
19
  persist-credentials: false
20
20
 
21
21
  # Files and rules come from .markdownlint-cli2.yaml, whose globs add to the action's default of the root files.
22
- - uses: DavidAnson/markdownlint-cli2-action@21c1be1b93ad9ed58fa840aacc3f279cde2a72ff # v24.2.0
22
+ - uses: DavidAnson/markdownlint-cli2-action@696eb3f2509270d7b882d2aa68347bc676e7af34 # v25.0.0
23
23
 
24
24
  markdown-links:
25
25
  runs-on: ubuntu-latest
@@ -35,7 +35,7 @@ jobs:
35
35
  key: lychee-${{ github.sha }}
36
36
  restore-keys: lychee-
37
37
 
38
- - uses: jdx/mise-action@c2a87611a18de5b3828c5652fe268e992400cb5c # v4.3.0
38
+ - uses: jdx/mise-action@b44d12e7d0d8ee7461bb893e1b1993500433185b # v5.2.7
39
39
  with:
40
40
  install_args: lychee
41
41
 
@@ -52,7 +52,7 @@ jobs:
52
52
  with:
53
53
  persist-credentials: false
54
54
 
55
- - uses: jdx/mise-action@c2a87611a18de5b3828c5652fe268e992400cb5c # v4.3.0
55
+ - uses: jdx/mise-action@b44d12e7d0d8ee7461bb893e1b1993500433185b # v5.2.7
56
56
  with:
57
57
  install_args: python uv pypi:yamllint
58
58
 
@@ -67,7 +67,7 @@ jobs:
67
67
  with:
68
68
  persist-credentials: false
69
69
 
70
- - uses: jdx/mise-action@c2a87611a18de5b3828c5652fe268e992400cb5c # v4.3.0
70
+ - uses: jdx/mise-action@b44d12e7d0d8ee7461bb893e1b1993500433185b # v5.2.7
71
71
  with:
72
72
  install_args: actionlint shellcheck
73
73
 
@@ -18,6 +18,6 @@ jobs:
18
18
  conventional-pr-title:
19
19
  runs-on: ubuntu-latest
20
20
  steps:
21
- - uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
21
+ - uses: amannn/action-semantic-pull-request@2252a14e810aa9b85c2d560bd7070c802206ecf6 # v6.1.2
22
22
  env:
23
23
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -30,10 +30,13 @@ jobs:
30
30
  exit 1
31
31
  fi
32
32
 
33
- - uses: jdx/mise-action@c2a87611a18de5b3828c5652fe268e992400cb5c # v4.3.0
33
+ # No cache in the release, a poisoned cache would end up in the published package.
34
+ - uses: jdx/mise-action@b44d12e7d0d8ee7461bb893e1b1993500433185b # v5.2.7
35
+ with:
36
+ cache: false
34
37
 
35
38
  - name: Build
36
39
  run: uv build
37
40
 
38
41
  # Trusted publishing: PyPI trusts this workflow and the pypi environment, no token needed.
39
- - uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
42
+ - uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: MR Test
2
+ name: Test
3
3
 
4
4
  on:
5
5
  workflow_dispatch:
@@ -13,12 +13,30 @@ on:
13
13
  permissions:
14
14
  contents: read
15
15
 
16
- concurrency:
17
- group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
18
- cancel-in-progress: true
19
-
20
16
  jobs:
17
+ # Queues the runs of pull requests and main, one at a time. Pull requests that
18
+ # are behind main are rebased, so automerge isn't blocked by the ruleset's
19
+ # up-to-date requirement. Pull requests from forks get no secrets and skip the
20
+ # wait.
21
+ boarding-gate:
22
+ if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
23
+ permissions:
24
+ actions: read
25
+ contents: write # lock refs under refs/boarding-gate/
26
+ pull-requests: read # labels for label-weights
27
+ statuses: write # queue position as commit status
28
+ # Queue order, the concurrency group that cancels outdated waiting runs and
29
+ # the rebase of branches that are behind main: see
30
+ # https://github.com/udondan/boarding-gate#reusable-workflow
31
+ # The rebase needs OVERRIDE_TOKEN: pushes with github.token don't start new runs.
32
+ uses: udondan/boarding-gate/.github/workflows/boarding-gate.yml@v1
33
+ secrets:
34
+ update-token: ${{ secrets.OVERRIDE_TOKEN }}
35
+
21
36
  test:
37
+ needs: boarding-gate
38
+ # The wait is skipped for forks.
39
+ if: ${{ !cancelled() && (needs.boarding-gate.result == 'success' || needs.boarding-gate.result == 'skipped') }}
22
40
  runs-on: ubuntu-latest
23
41
  timeout-minutes: 15
24
42
  permissions:
@@ -37,7 +55,7 @@ jobs:
37
55
  with:
38
56
  persist-credentials: false
39
57
 
40
- - uses: jdx/mise-action@c2a87611a18de5b3828c5652fe268e992400cb5c # v4.3.0
58
+ - uses: jdx/mise-action@b44d12e7d0d8ee7461bb893e1b1993500433185b # v5.2.7
41
59
 
42
60
  - name: Install dependencies
43
61
  run: mise run install
@@ -63,7 +81,7 @@ jobs:
63
81
  name: Coverage
64
82
  runs-on: ubuntu-latest
65
83
  needs: [test]
66
- if: github.event_name == 'pull_request' && needs.test.result == 'success'
84
+ if: ${{ !cancelled() && github.event_name == 'pull_request' && needs.test.result == 'success' }}
67
85
  timeout-minutes: 10
68
86
  permissions:
69
87
  checks: read
@@ -92,6 +110,8 @@ jobs:
92
110
  echo "::warning::Codecov didn't report within 5 minutes, coverage is not checked."
93
111
 
94
112
  build:
113
+ needs: boarding-gate
114
+ if: ${{ !cancelled() && (needs.boarding-gate.result == 'success' || needs.boarding-gate.result == 'skipped') }}
95
115
  runs-on: ubuntu-latest
96
116
  timeout-minutes: 10
97
117
  steps:
@@ -99,18 +119,56 @@ jobs:
99
119
  with:
100
120
  persist-credentials: false
101
121
 
102
- - uses: jdx/mise-action@c2a87611a18de5b3828c5652fe268e992400cb5c # v4.3.0
122
+ - uses: jdx/mise-action@b44d12e7d0d8ee7461bb893e1b1993500433185b # v5.2.7
103
123
 
104
124
  - name: Build
105
125
  run: uv build
106
126
 
107
127
  lint:
128
+ needs: boarding-gate
129
+ if: ${{ !cancelled() && (needs.boarding-gate.result == 'success' || needs.boarding-gate.result == 'skipped') }}
108
130
  uses: ./.github/workflows/lint.yml
109
131
 
132
+ # The linters and code smells of Qlty Cloud, configured in .qlty/qlty.toml. On pull requests, only smells introduced
133
+ # compared to main fail the job.
134
+ qlty:
135
+ needs: boarding-gate
136
+ if: ${{ !cancelled() && (needs.boarding-gate.result == 'success' || needs.boarding-gate.result == 'skipped') }}
137
+ runs-on: ubuntu-latest
138
+ timeout-minutes: 10
139
+ steps:
140
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
141
+ with:
142
+ persist-credentials: false
143
+ fetch-depth: 0
144
+
145
+ - name: Install qlty
146
+ uses: qltysh/qlty-action/install@ebcd284bf32e36a030afe15f1e136c7be08b9506 # v2.5.0
147
+
148
+ - name: Lint via qlty plugins
149
+ run: qlty check --all
150
+
151
+ - name: Report code smells
152
+ if: github.event_name != 'pull_request'
153
+ run: qlty smells --all --no-snippets
154
+
155
+ - name: Report new code smells
156
+ if: github.event_name == 'pull_request'
157
+ run: qlty smells --upstream origin/main --no-snippets
158
+
159
+ - name: Fail on new code smells
160
+ if: github.event_name == 'pull_request'
161
+ run: |
162
+ count=$(qlty smells --upstream origin/main --json --quiet 2>/dev/null | jq length)
163
+ if [ "$count" -gt 0 ]; then
164
+ echo "::error::qlty found $count new code smell(s) compared to main"
165
+ exit 1
166
+ fi
167
+
110
168
  # One status check for the ruleset, whatever jobs are added later.
111
169
  required:
112
170
  runs-on: ubuntu-latest
113
- needs: [test, coverage, build, lint]
171
+ needs: [boarding-gate, test, coverage, build, lint, qlty]
114
172
  if: always()
115
173
  steps:
116
174
  - name: Check result
@@ -0,0 +1,9 @@
1
+ ---
2
+ # Actions are pinned to a commit SHA. The reusable workflow of boarding-gate is
3
+ # used by its major tag, so every release reaches this repo without update PRs.
4
+ rules:
5
+ unpinned-uses:
6
+ config:
7
+ policies:
8
+ "udondan/boarding-gate/*": ref-pin
9
+ "*": hash-pin
@@ -0,0 +1,7 @@
1
+ *
2
+ !configs
3
+ !configs/**
4
+ !hooks
5
+ !hooks/**
6
+ !qlty.toml
7
+ !.gitignore
@@ -0,0 +1,97 @@
1
+ # Used by Qlty Cloud and by the qlty job of test.yml. The plugins are the ones `qlty init` enables for this
2
+ # repository. All of them and the code smells block, so a finding fails the job.
3
+ #
4
+ # Guide: https://qlty.sh/d/config, reference: https://qlty.sh/d/qlty-toml
5
+ config_version = "0"
6
+
7
+ exclude_patterns = [
8
+ "*_min.*",
9
+ "*-min.*",
10
+ "*.min.*",
11
+ "**/.yarn/**",
12
+ "**/*.d.ts",
13
+ "**/assets/**",
14
+ "**/bower_components/**",
15
+ "**/build/**",
16
+ "**/cache/**",
17
+ "**/config/**",
18
+ "**/db/**",
19
+ "**/deps/**",
20
+ "**/dist/**",
21
+ "**/extern/**",
22
+ "**/external/**",
23
+ "**/generated/**",
24
+ "**/Godeps/**",
25
+ "**/gradlew/**",
26
+ "**/mvnw/**",
27
+ "**/node_modules/**",
28
+ "**/protos/**",
29
+ "**/seed/**",
30
+ "**/target/**",
31
+ "**/templates/**",
32
+ "**/testdata/**",
33
+ "**/vendor/**",
34
+ "**/.claude/**",
35
+ ]
36
+
37
+ test_patterns = [
38
+ "**/test/**",
39
+ "**/spec/**",
40
+ "**/*.test.*",
41
+ "**/*.spec.*",
42
+ "**/*_test.*",
43
+ "**/*_spec.*",
44
+ "**/test_*.*",
45
+ "**/spec_*.*",
46
+ ]
47
+
48
+ [smells]
49
+ mode = "block"
50
+
51
+ # Counts self, and functions with this many parameters are reported. SubscriptionsClient.__init__ takes the session
52
+ # and five options as keyword parameters, which are its public API. Smells cannot be ignored per file.
53
+ [smells.function_parameters]
54
+ threshold = 7
55
+
56
+ [[source]]
57
+ name = "default"
58
+ default = true
59
+
60
+ [[plugin]]
61
+ name = "actionlint"
62
+
63
+ [[plugin]]
64
+ name = "bandit"
65
+
66
+ [[plugin]]
67
+ name = "radarlint-python"
68
+
69
+ [[plugin]]
70
+ name = "ripgrep"
71
+
72
+ [[plugin]]
73
+ name = "ruff"
74
+ drivers = [
75
+ "lint",
76
+ ]
77
+
78
+ [[plugin]]
79
+ name = "trufflehog"
80
+
81
+ [[plugin]]
82
+ name = "yamllint"
83
+
84
+ [[plugin]]
85
+ name = "zizmor"
86
+
87
+ # pytest checks with assert.
88
+ [[triage]]
89
+ match.rules = ["bandit:B101"]
90
+ match.file_patterns = ["tests/**"]
91
+ set.ignored = true
92
+
93
+ # The TODOs of #41 and #42. Remove this once both are resolved.
94
+ [[triage]]
95
+ match.rules = ["ripgrep:TODO", "radarlint-python:python:S1135"]
96
+ match.file_patterns = ["amazon_subscriptions/locales/en.py"]
97
+ set.ignored = true
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "1.1.1"
3
+ }
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.1.1](https://github.com/udondan/amazon-subscriptions/compare/v1.1.0...v1.1.1) (2026-11-09)
4
+
5
+
6
+ ### Dependencies
7
+
8
+ * **deps:** replace amazon-orders with amazon-auth ([#52](https://github.com/udondan/amazon-subscriptions/issues/52)) ([6771e25](https://github.com/udondan/amazon-subscriptions/commit/6771e25d5584f4891139ae147f6f2352523dca62))
9
+ * **deps:** update dependency amazon-auth to v0.2.3 ([#57](https://github.com/udondan/amazon-subscriptions/issues/57)) ([8cac493](https://github.com/udondan/amazon-subscriptions/commit/8cac493c598e6b4cb96b9465a5b669b41f34ceb2))
10
+ * **deps:** update dependency click to v8.5.1 ([#53](https://github.com/udondan/amazon-subscriptions/issues/53)) ([3c01915](https://github.com/udondan/amazon-subscriptions/commit/3c01915265aee358258560be61471b4d8cd678e8))
11
+
3
12
  ## [1.1.0](https://github.com/udondan/amazon-subscriptions/compare/v1.0.1...v1.1.0) (2026-11-01)
4
13
 
5
14
 
@@ -44,8 +53,3 @@
44
53
 
45
54
  * read the seller name of alternative offers from the offer row and add seller_id ([#6](https://github.com/udondan/amazon-subscriptions/issues/6)) ([0accfb9](https://github.com/udondan/amazon-subscriptions/commit/0accfb9d4ce017e0a3fe50e47d2d29d709fd1b38))
46
55
  * return a partial result instead of failing when a delivery or product page cannot be read ([#7](https://github.com/udondan/amazon-subscriptions/issues/7)) ([3a3f08f](https://github.com/udondan/amazon-subscriptions/commit/3a3f08f8d797a0472b6add240c3ae454bb5755d2))
47
-
48
-
49
- ### Dependencies
50
-
51
- * **deps:** update dependency ruff to v0.16.9 ([#9](https://github.com/udondan/amazon-subscriptions/issues/9)) ([ff25334](https://github.com/udondan/amazon-subscriptions/commit/ff25334c39d4e21857432ae0b9e83ddbfbcadf92))
@@ -1,8 +1,38 @@
1
+ Metadata-Version: 2.5
2
+ Name: amazon-subscriptions
3
+ Version: 1.1.1
4
+ Summary: Unofficial tool to read Amazon Subscribe & Save subscriptions and upcoming deliveries as JSON (read-only)
5
+ Author: Daniel Schroeder
6
+ License-Expression: MIT
7
+ License-File: LICENSE
8
+ Classifier: Operating System :: OS Independent
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.11
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Classifier: Programming Language :: Python :: 3.13
13
+ Classifier: Programming Language :: Python :: 3.14
14
+ Classifier: Programming Language :: Python :: 3.15
15
+ Requires-Python: >=3.11
16
+ Requires-Dist: amazon-auth<1,>=0.2.1
17
+ Requires-Dist: beautifulsoup4==4.15.0
18
+ Requires-Dist: click==8.5.1
19
+ Description-Content-Type: text/markdown
20
+
1
21
  # amazon-subscriptions
2
22
 
23
+ [![PyPI](https://img.shields.io/pypi/v/amazon-subscriptions)](https://pypi.org/project/amazon-subscriptions/)
24
+ [![Python](https://img.shields.io/pypi/pyversions/amazon-subscriptions)](https://pypi.org/project/amazon-subscriptions/)
25
+ [![CI](https://github.com/udondan/amazon-subscriptions/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/udondan/amazon-subscriptions/actions/workflows/test.yml)
26
+ [![codecov](https://codecov.io/gh/udondan/amazon-subscriptions/graph/badge.svg)](https://codecov.io/gh/udondan/amazon-subscriptions)
27
+ [![Maintainability](https://qlty.sh/gh/udondan/projects/amazon-subscriptions/maintainability.svg)](https://qlty.sh/gh/udondan/projects/amazon-subscriptions)
28
+ [![License](https://img.shields.io/github/license/udondan/amazon-subscriptions)](LICENSE)
29
+
30
+ > [!NOTE]
31
+ > Unofficial community project. Not affiliated with, endorsed or authorized by Amazon.
32
+
3
33
  Read Amazon Subscribe & Save subscriptions and upcoming deliveries as JSON. Strictly read-only.
4
34
 
5
- Built on [amazon-orders](https://github.com/alexdlaird/amazon-orders), which handles login and the session, and
35
+ Built on [amazon-auth](https://github.com/alexdlaird/amazon-auth), which handles login and the session, and
6
36
  requests every page in English, whatever language the account is set to. Every Amazon site that offers its pages in
7
37
  English is supported; so far it is tested with amazon.de. See [Other sites](#other-sites).
8
38
 
@@ -33,7 +63,7 @@ Or from a checkout, prefixing the commands below with `uv run`:
33
63
  uv sync
34
64
  ```
35
65
 
36
- The installation includes amazon-orders; its CLI is not needed.
66
+ The installation includes amazon-auth, which handles login and the session.
37
67
 
38
68
  ## Usage
39
69
 
@@ -48,13 +78,13 @@ amazon-subscriptions check-session
48
78
  amazon-subscriptions logout
49
79
  ```
50
80
 
51
- `login`, `logout` and `check-session` are the commands of amazon-orders. Each Amazon site has its own session, stored
52
- in `~/.config/amazonorders/cookies.<site>.json` (e.g. `cookies.amazon.de.json`, for amazon.com `cookies.json`) and
53
- shared with amazon-orders. A session that older versions of amazon-orders stored in `cookies.json` for another site is
54
- still used. Credentials are only asked for by `login` and never stored; the other commands never log in by themselves.
55
- `login` signs out of the site's stored session first, so it always starts a new one. `login --browser` signs in
56
- through a browser window instead, which needs the `browser` extra of amazon-orders. `check-session --verify` asks
57
- Amazon whether it still accepts the session.
81
+ `login`, `logout` and `check-session` are the commands of amazon-auth. Each Amazon site has its own session, stored in
82
+ `~/.config/amazonorders/cookies.<site>.json` (e.g. `cookies.amazon.de.json`, for amazon.com `cookies.json`) and shared
83
+ with amazon-orders. A session that older versions of amazon-orders stored in `cookies.json` for another site is still
84
+ used. Credentials are only asked for by `login` and never stored; the other commands never log in by themselves.
85
+ `login` signs out of the site's stored session first, so it always starts a new one. `login --browser` signs in through
86
+ a browser window instead, which needs the `browser` extra of amazon-auth. `check-session --verify` asks Amazon whether
87
+ it still accepts the session.
58
88
 
59
89
  A `language_package` configured for amazon-orders is ignored, as the pages are only read in English. The configuration
60
90
  file is not changed.
@@ -224,13 +254,13 @@ A list of deliveries:
224
254
  ## Library
225
255
 
226
256
  ```python
227
- from amazonorders.conf import AmazonOrdersConfig
228
- from amazonorders.session import AmazonSession
257
+ from amazonauth.conf import AmazonAuthConfig
258
+ from amazonauth.session import AmazonSession
229
259
 
230
260
  from amazon_subscriptions.client import SubscriptionsClient
231
261
  from amazon_subscriptions.serialize import to_json
232
262
 
233
- session = AmazonSession(config=AmazonOrdersConfig()) # logged in with `amazon-subscriptions login`
263
+ session = AmazonSession(config=AmazonAuthConfig()) # logged in with `amazon-subscriptions login`
234
264
  client = SubscriptionsClient(session) # with_prices=True also loads the product pages
235
265
  print(to_json(client.get_subscriptions()))
236
266
  print(to_json(client.get_upcoming_deliveries()))
@@ -276,7 +306,7 @@ amazon.com.br, amazon.com.mx, amazon.com.tr and amazon.pl, are refused.
276
306
 
277
307
  Only amazon.de has been tested so far. On other sites, the texts, the markup of the pages or the URLs may differ, so
278
308
  some values may be missing (with a warning or an `[incomplete]` result) or a page may not be read at all. Login,
279
- session and cookies are handled by amazon-orders for all sites.
309
+ session and cookies are handled by amazon-auth for all sites.
280
310
 
281
311
  If you use another site, please contribute anonymized pages of it, so it can be tested.
282
312
  [CONTRIBUTING.md](CONTRIBUTING.md) explains step by step how to capture and anonymize them.
@@ -299,3 +329,10 @@ The test fixtures in `tests/fixtures/<tld>/` are anonymized English pages, see [
299
329
  how to capture and anonymize them. The product page fixtures (`product*.html`) are reduced to their title and price
300
330
  blocks with `scripts/extract_product_fixture.py`. It also keeps the variants, the comparison widget and a sponsored
301
331
  product, as prices the parser must not read.
332
+
333
+ ## Disclaimer
334
+
335
+ This is an unofficial, independent open-source project and is not affiliated with Amazon.com, Inc. or its affiliates.
336
+ Amazon and Subscribe & Save are trademarks of Amazon.com, Inc. or its affiliates. The names are used only to describe
337
+ compatibility. This tool reads pages of your own Amazon account automatically, which Amazon's Conditions of Use may
338
+ not permit. Use at your own risk and in accordance with the Conditions of Use of your Amazon site.
@@ -1,21 +1,18 @@
1
- Metadata-Version: 2.5
2
- Name: amazon-subscriptions
3
- Version: 1.1.0
4
- Summary: Read Amazon Subscribe & Save subscriptions and upcoming deliveries as JSON (read-only)
5
- Author: Daniel Schroeder
6
- License-Expression: MIT
7
- License-File: LICENSE
8
- Requires-Python: >=3.11
9
- Requires-Dist: amazon-orders<6,>=5.2.0
10
- Requires-Dist: beautifulsoup4==4.15.0
11
- Requires-Dist: click==8.5.0
12
- Description-Content-Type: text/markdown
13
-
14
1
  # amazon-subscriptions
15
2
 
3
+ [![PyPI](https://img.shields.io/pypi/v/amazon-subscriptions)](https://pypi.org/project/amazon-subscriptions/)
4
+ [![Python](https://img.shields.io/pypi/pyversions/amazon-subscriptions)](https://pypi.org/project/amazon-subscriptions/)
5
+ [![CI](https://github.com/udondan/amazon-subscriptions/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/udondan/amazon-subscriptions/actions/workflows/test.yml)
6
+ [![codecov](https://codecov.io/gh/udondan/amazon-subscriptions/graph/badge.svg)](https://codecov.io/gh/udondan/amazon-subscriptions)
7
+ [![Maintainability](https://qlty.sh/gh/udondan/projects/amazon-subscriptions/maintainability.svg)](https://qlty.sh/gh/udondan/projects/amazon-subscriptions)
8
+ [![License](https://img.shields.io/github/license/udondan/amazon-subscriptions)](LICENSE)
9
+
10
+ > [!NOTE]
11
+ > Unofficial community project. Not affiliated with, endorsed or authorized by Amazon.
12
+
16
13
  Read Amazon Subscribe & Save subscriptions and upcoming deliveries as JSON. Strictly read-only.
17
14
 
18
- Built on [amazon-orders](https://github.com/alexdlaird/amazon-orders), which handles login and the session, and
15
+ Built on [amazon-auth](https://github.com/alexdlaird/amazon-auth), which handles login and the session, and
19
16
  requests every page in English, whatever language the account is set to. Every Amazon site that offers its pages in
20
17
  English is supported; so far it is tested with amazon.de. See [Other sites](#other-sites).
21
18
 
@@ -46,7 +43,7 @@ Or from a checkout, prefixing the commands below with `uv run`:
46
43
  uv sync
47
44
  ```
48
45
 
49
- The installation includes amazon-orders; its CLI is not needed.
46
+ The installation includes amazon-auth, which handles login and the session.
50
47
 
51
48
  ## Usage
52
49
 
@@ -61,13 +58,13 @@ amazon-subscriptions check-session
61
58
  amazon-subscriptions logout
62
59
  ```
63
60
 
64
- `login`, `logout` and `check-session` are the commands of amazon-orders. Each Amazon site has its own session, stored
65
- in `~/.config/amazonorders/cookies.<site>.json` (e.g. `cookies.amazon.de.json`, for amazon.com `cookies.json`) and
66
- shared with amazon-orders. A session that older versions of amazon-orders stored in `cookies.json` for another site is
67
- still used. Credentials are only asked for by `login` and never stored; the other commands never log in by themselves.
68
- `login` signs out of the site's stored session first, so it always starts a new one. `login --browser` signs in
69
- through a browser window instead, which needs the `browser` extra of amazon-orders. `check-session --verify` asks
70
- Amazon whether it still accepts the session.
61
+ `login`, `logout` and `check-session` are the commands of amazon-auth. Each Amazon site has its own session, stored in
62
+ `~/.config/amazonorders/cookies.<site>.json` (e.g. `cookies.amazon.de.json`, for amazon.com `cookies.json`) and shared
63
+ with amazon-orders. A session that older versions of amazon-orders stored in `cookies.json` for another site is still
64
+ used. Credentials are only asked for by `login` and never stored; the other commands never log in by themselves.
65
+ `login` signs out of the site's stored session first, so it always starts a new one. `login --browser` signs in through
66
+ a browser window instead, which needs the `browser` extra of amazon-auth. `check-session --verify` asks Amazon whether
67
+ it still accepts the session.
71
68
 
72
69
  A `language_package` configured for amazon-orders is ignored, as the pages are only read in English. The configuration
73
70
  file is not changed.
@@ -237,13 +234,13 @@ A list of deliveries:
237
234
  ## Library
238
235
 
239
236
  ```python
240
- from amazonorders.conf import AmazonOrdersConfig
241
- from amazonorders.session import AmazonSession
237
+ from amazonauth.conf import AmazonAuthConfig
238
+ from amazonauth.session import AmazonSession
242
239
 
243
240
  from amazon_subscriptions.client import SubscriptionsClient
244
241
  from amazon_subscriptions.serialize import to_json
245
242
 
246
- session = AmazonSession(config=AmazonOrdersConfig()) # logged in with `amazon-subscriptions login`
243
+ session = AmazonSession(config=AmazonAuthConfig()) # logged in with `amazon-subscriptions login`
247
244
  client = SubscriptionsClient(session) # with_prices=True also loads the product pages
248
245
  print(to_json(client.get_subscriptions()))
249
246
  print(to_json(client.get_upcoming_deliveries()))
@@ -289,7 +286,7 @@ amazon.com.br, amazon.com.mx, amazon.com.tr and amazon.pl, are refused.
289
286
 
290
287
  Only amazon.de has been tested so far. On other sites, the texts, the markup of the pages or the URLs may differ, so
291
288
  some values may be missing (with a warning or an `[incomplete]` result) or a page may not be read at all. Login,
292
- session and cookies are handled by amazon-orders for all sites.
289
+ session and cookies are handled by amazon-auth for all sites.
293
290
 
294
291
  If you use another site, please contribute anonymized pages of it, so it can be tested.
295
292
  [CONTRIBUTING.md](CONTRIBUTING.md) explains step by step how to capture and anonymize them.
@@ -312,3 +309,10 @@ The test fixtures in `tests/fixtures/<tld>/` are anonymized English pages, see [
312
309
  how to capture and anonymize them. The product page fixtures (`product*.html`) are reduced to their title and price
313
310
  blocks with `scripts/extract_product_fixture.py`. It also keeps the variants, the comparison widget and a sponsored
314
311
  product, as prices the parser must not read.
312
+
313
+ ## Disclaimer
314
+
315
+ This is an unofficial, independent open-source project and is not affiliated with Amazon.com, Inc. or its affiliates.
316
+ Amazon and Subscribe & Save are trademarks of Amazon.com, Inc. or its affiliates. The names are used only to describe
317
+ compatibility. This tool reads pages of your own Amazon account automatically, which Amazon's Conditions of Use may
318
+ not permit. Use at your own risk and in accordance with the Conditions of Use of your Amazon site.