amazon-subscriptions 1.0.1__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 (84) hide show
  1. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/.github/workflows/automerge-schedule.yml +6 -5
  2. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/.github/workflows/lint.yml +6 -6
  3. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/.github/workflows/pr-conventional-title.yml +1 -1
  4. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/.github/workflows/publish.yml +5 -2
  5. amazon_subscriptions-1.1.1/.github/workflows/test.yml +178 -0
  6. amazon_subscriptions-1.1.1/.github/zizmor.yml +9 -0
  7. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/.gitignore +1 -0
  8. amazon_subscriptions-1.1.1/.qlty/.gitignore +7 -0
  9. amazon_subscriptions-1.1.1/.qlty/qlty.toml +97 -0
  10. amazon_subscriptions-1.1.1/.release-please-manifest.json +3 -0
  11. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/CHANGELOG.md +21 -5
  12. amazon_subscriptions-1.0.1/README.md → amazon_subscriptions-1.1.1/PKG-INFO +51 -14
  13. amazon_subscriptions-1.0.1/PKG-INFO → amazon_subscriptions-1.1.1/README.md +31 -27
  14. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/amazon_subscriptions/cli.py +15 -65
  15. amazon_subscriptions-1.1.1/amazon_subscriptions/client.py +233 -0
  16. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/amazon_subscriptions/locales/__init__.py +4 -5
  17. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/amazon_subscriptions/locales/en.py +4 -4
  18. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/amazon_subscriptions/models.py +5 -5
  19. amazon_subscriptions-1.1.1/amazon_subscriptions/pages.py +264 -0
  20. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/amazon_subscriptions/parse/__init__.py +10 -1
  21. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/amazon_subscriptions/parse/deliveries.py +34 -6
  22. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/amazon_subscriptions/parse/matching.py +23 -0
  23. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/amazon_subscriptions/parse/product.py +3 -38
  24. amazon_subscriptions-1.1.1/amazon_subscriptions/parse/widget.py +68 -0
  25. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/amazon_subscriptions/serialize.py +4 -0
  26. amazon_subscriptions-1.1.1/amazon_subscriptions/text.py +60 -0
  27. amazon_subscriptions-1.1.1/codecov.yml +22 -0
  28. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/mise.toml +5 -2
  29. amazon_subscriptions-1.1.1/pyproject.toml +58 -0
  30. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/release-please-config.json +3 -2
  31. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/renovate.json +2 -2
  32. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/scripts/anonymize_fixtures.py +2 -189
  33. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/scripts/extract_product_fixture.py +45 -96
  34. amazon_subscriptions-1.1.1/scripts/fixture_html.py +86 -0
  35. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/scripts/privacy_scan.py +26 -19
  36. amazon_subscriptions-1.1.1/scripts/subscriptions_anonymizer.py +197 -0
  37. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/tests/conftest.py +27 -22
  38. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/tests/test_cli.py +35 -11
  39. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/tests/test_client.py +91 -5
  40. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/tests/test_locale.py +1 -1
  41. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/tests/test_parse_deliveries.py +31 -1
  42. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/tests/test_parse_product.py +20 -1
  43. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/tests/test_serialize.py +4 -0
  44. amazon_subscriptions-1.1.1/tests/test_text.py +38 -0
  45. amazon_subscriptions-1.1.1/uv.lock +972 -0
  46. amazon_subscriptions-1.0.1/.github/workflows/mr-test.yml +0 -73
  47. amazon_subscriptions-1.0.1/.release-please-manifest.json +0 -3
  48. amazon_subscriptions-1.0.1/amazon_subscriptions/client.py +0 -485
  49. amazon_subscriptions-1.0.1/pyproject.toml +0 -48
  50. amazon_subscriptions-1.0.1/uv.lock +0 -952
  51. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/.github/workflows/release-please.yml +0 -0
  52. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/.markdownlint-cli2.yaml +0 -0
  53. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/.yamllint.yml +0 -0
  54. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/CONTRIBUTING.md +0 -0
  55. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/LICENSE +0 -0
  56. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/amazon_subscriptions/__init__.py +0 -0
  57. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/amazon_subscriptions/dates.py +0 -0
  58. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/amazon_subscriptions/exceptions.py +0 -0
  59. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/amazon_subscriptions/locales/base.py +0 -0
  60. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/amazon_subscriptions/parse/acp.py +0 -0
  61. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/amazon_subscriptions/parse/detail.py +0 -0
  62. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/amazon_subscriptions/parse/selectors.py +0 -0
  63. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/amazon_subscriptions/parse/subscriptions.py +0 -0
  64. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/amazon_subscriptions/parse/util.py +0 -0
  65. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/lychee.toml +0 -0
  66. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/scripts/vendor/README.md +0 -0
  67. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/scripts/vendor/anonymize_test_resources.py +0 -0
  68. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/tests/__init__.py +0 -0
  69. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/tests/fixtures/de/deliveries-page-2.html +0 -0
  70. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/tests/fixtures/de/delivery-1.html +0 -0
  71. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/tests/fixtures/de/delivery-2.html +0 -0
  72. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/tests/fixtures/de/landing.html +0 -0
  73. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/tests/fixtures/de/product-alternative-offer.html +0 -0
  74. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/tests/fixtures/de/product-no-buybox.html +0 -0
  75. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/tests/fixtures/de/product-rrp.html +0 -0
  76. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/tests/fixtures/de/product-single-offer.html +0 -0
  77. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/tests/fixtures/de/product-unavailable.html +0 -0
  78. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/tests/fixtures/de/product-was.html +0 -0
  79. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/tests/fixtures/de/product.html +0 -0
  80. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/tests/fixtures/de/subscription-detail.html +0 -0
  81. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/tests/test_dates.py +0 -0
  82. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/tests/test_matching.py +0 -0
  83. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/tests/test_parse_detail.py +0 -0
  84. {amazon_subscriptions-1.0.1 → amazon_subscriptions-1.1.1}/tests/test_parse_subscriptions.py +0 -0
@@ -10,15 +10,17 @@ jobs:
10
10
  automerge:
11
11
  if: ${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
12
12
  runs-on: ubuntu-latest
13
+ permissions: {}
13
14
  steps:
14
15
  - name: Enable auto-merge on release-please PR
15
16
  env:
16
17
  GH_TOKEN: ${{ secrets.OVERRIDE_TOKEN }}
18
+ GH_REPO: ${{ github.repository }}
19
+ BASE_BRANCH: ${{ github.event.repository.default_branch }}
17
20
  run: |
18
21
  PRS=$(gh pr list \
19
- --repo "${{ github.repository }}" \
20
22
  --label "autorelease: pending" \
21
- --base "${{ github.event.repository.default_branch }}" \
23
+ --base "$BASE_BRANCH" \
22
24
  --state open \
23
25
  --json number)
24
26
 
@@ -34,9 +36,8 @@ jobs:
34
36
  if [ -n "$PR" ]; then
35
37
  # Auto-merge waits for the branch to be up to date with main, and release-please leaves it
36
38
  # behind when the new commits don't change the release notes.
37
- gh pr update-branch "$PR" --repo "${{ github.repository }}"
38
- gh pr merge "$PR" --auto --squash --delete-branch \
39
- --repo "${{ github.repository }}"
39
+ gh pr update-branch "$PR"
40
+ gh pr merge "$PR" --auto --squash --delete-branch
40
41
  echo "Auto-merge enabled on PR #$PR"
41
42
  else
42
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
@@ -0,0 +1,178 @@
1
+ ---
2
+ name: Test
3
+
4
+ on:
5
+ workflow_dispatch:
6
+ push:
7
+ branches:
8
+ - main
9
+ pull_request:
10
+ branches:
11
+ - main
12
+
13
+ permissions:
14
+ contents: read
15
+
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
+
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') }}
40
+ runs-on: ubuntu-latest
41
+ timeout-minutes: 15
42
+ permissions:
43
+ contents: read
44
+ # Codecov upload via OIDC, no token needed.
45
+ id-token: write
46
+ strategy:
47
+ fail-fast: false
48
+ matrix:
49
+ # The oldest supported version (requires-python) and the one of mise.toml.
50
+ python: ["3.11", "3.14"]
51
+ env:
52
+ UV_PYTHON: ${{ matrix.python }}
53
+ steps:
54
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
55
+ with:
56
+ persist-credentials: false
57
+
58
+ - uses: jdx/mise-action@b44d12e7d0d8ee7461bb893e1b1993500433185b # v5.2.7
59
+
60
+ - name: Install dependencies
61
+ run: mise run install
62
+
63
+ - name: Lint
64
+ run: mise run lint
65
+
66
+ - name: Test
67
+ run: mise run test-coverage
68
+
69
+ - name: Upload coverage to Codecov
70
+ uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
71
+ with:
72
+ use_oidc: true
73
+ fail_ci_if_error: false
74
+ files: coverage.xml
75
+
76
+ # Codecov reports its result as the check runs codecov/project and
77
+ # codecov/patch. This job waits for them, so a coverage drop fails the
78
+ # required job. It is skipped along with the tests, and passes with a warning
79
+ # if Codecov doesn't report in time.
80
+ coverage:
81
+ name: Coverage
82
+ runs-on: ubuntu-latest
83
+ needs: [test]
84
+ if: ${{ !cancelled() && github.event_name == 'pull_request' && needs.test.result == 'success' }}
85
+ timeout-minutes: 10
86
+ permissions:
87
+ checks: read
88
+ steps:
89
+ - name: Wait for Codecov
90
+ env:
91
+ GH_TOKEN: ${{ github.token }}
92
+ REPO: ${{ github.repository }}
93
+ SHA: ${{ github.event.pull_request.head.sha }}
94
+ run: |
95
+ for _ in $(seq 30); do
96
+ checks=$(gh api --paginate --slurp "repos/$REPO/commits/$SHA/check-runs?per_page=100" | jq -c '
97
+ [.[].check_runs[] | select(.app.slug == "codecov" and (.name == "codecov/project" or .name == "codecov/patch"))]
98
+ | group_by(.name) | map(max_by(.id))')
99
+ if [[ $(jq '[.[] | select(.status == "completed")] | length' <<<"$checks") == 2 ]]; then
100
+ jq -r '.[] | "\(.name): \(.conclusion) (\(.output.title))"' <<<"$checks"
101
+ failed=$(jq -r '.[] | select(.conclusion != "success" and .conclusion != "neutral") | .name' <<<"$checks")
102
+ if [[ -n "$failed" ]]; then
103
+ echo "::error::Coverage check failed: ${failed//$'\n'/, }. Details are linked in the checks of this pull request."
104
+ exit 1
105
+ fi
106
+ exit 0
107
+ fi
108
+ sleep 10
109
+ done
110
+ echo "::warning::Codecov didn't report within 5 minutes, coverage is not checked."
111
+
112
+ build:
113
+ needs: boarding-gate
114
+ if: ${{ !cancelled() && (needs.boarding-gate.result == 'success' || needs.boarding-gate.result == 'skipped') }}
115
+ runs-on: ubuntu-latest
116
+ timeout-minutes: 10
117
+ steps:
118
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
119
+ with:
120
+ persist-credentials: false
121
+
122
+ - uses: jdx/mise-action@b44d12e7d0d8ee7461bb893e1b1993500433185b # v5.2.7
123
+
124
+ - name: Build
125
+ run: uv build
126
+
127
+ lint:
128
+ needs: boarding-gate
129
+ if: ${{ !cancelled() && (needs.boarding-gate.result == 'success' || needs.boarding-gate.result == 'skipped') }}
130
+ uses: ./.github/workflows/lint.yml
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
+
168
+ # One status check for the ruleset, whatever jobs are added later.
169
+ required:
170
+ runs-on: ubuntu-latest
171
+ needs: [boarding-gate, test, coverage, build, lint, qlty]
172
+ if: always()
173
+ steps:
174
+ - name: Check result
175
+ run: |
176
+ if [[ "${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}" == "true" ]]; then
177
+ exit 1
178
+ fi
@@ -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
@@ -8,6 +8,7 @@ dist/
8
8
  .ruff_cache/
9
9
  .mypy_cache/
10
10
  .coverage
11
+ coverage.xml
11
12
  htmlcov/
12
13
 
13
14
  # Debug output of amazon-orders (real, unanonymized pages)
@@ -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,26 @@
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
+
12
+ ## [1.1.0](https://github.com/udondan/amazon-subscriptions/compare/v1.0.1...v1.1.0) (2026-11-01)
13
+
14
+
15
+ ### Features
16
+
17
+ * drop support for Python 3.10 ([#28](https://github.com/udondan/amazon-subscriptions/issues/28)) ([fb02fae](https://github.com/udondan/amazon-subscriptions/commit/fb02fae0056b17c39251f1c949449e22dfef5621))
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **deps:** update certifi and pillow to patched versions ([#25](https://github.com/udondan/amazon-subscriptions/issues/25)) ([907956f](https://github.com/udondan/amazon-subscriptions/commit/907956f96158a162edc41abe1086d012823292b2))
23
+
3
24
  ## [1.0.1](https://github.com/udondan/amazon-subscriptions/compare/v1.0.0...v1.0.1) (2026-10-28)
4
25
 
5
26
 
@@ -32,8 +53,3 @@
32
53
 
33
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))
34
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))
35
-
36
-
37
- ### Dependencies
38
-
39
- * **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,14 +1,44 @@
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
 
9
39
  ## Installation
10
40
 
11
- Requires Python 3.10 or later. Install the CLI from [PyPI](https://pypi.org/project/amazon-subscriptions/) with
41
+ Requires Python 3.11 or later. Install the CLI from [PyPI](https://pypi.org/project/amazon-subscriptions/) with
12
42
  [uv](https://docs.astral.sh/uv/):
13
43
 
14
44
  ```sh
@@ -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.