Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1413 commits
Select commit Hold shift + click to select a range
da750ff
codegen metadata
stainless-app[bot] Oct 2, 2025
ac471d0
codegen metadata
stainless-app[bot] Oct 2, 2025
3039b26
codegen metadata
stainless-app[bot] Oct 2, 2025
99ee43a
codegen metadata
stainless-app[bot] Oct 2, 2025
cb72835
codegen metadata
stainless-app[bot] Oct 2, 2025
9ff7081
codegen metadata
stainless-app[bot] Oct 2, 2025
c624119
codegen metadata
stainless-app[bot] Oct 2, 2025
e431512
codegen metadata
stainless-app[bot] Oct 2, 2025
1da6c4c
codegen metadata
stainless-app[bot] Oct 2, 2025
fc8f725
codegen metadata
stainless-app[bot] Oct 2, 2025
3f2b66d
codegen metadata
stainless-app[bot] Oct 2, 2025
d8dbd52
codegen metadata
stainless-app[bot] Oct 2, 2025
ec20dd8
codegen metadata
stainless-app[bot] Oct 2, 2025
5dca1fd
codegen metadata
stainless-app[bot] Oct 2, 2025
edc9d38
codegen metadata
stainless-app[bot] Oct 2, 2025
4f72227
codegen metadata
stainless-app[bot] Oct 2, 2025
a8e4a0e
codegen metadata
stainless-app[bot] Oct 2, 2025
2395de9
codegen metadata
stainless-app[bot] Oct 2, 2025
0951b1d
codegen metadata
stainless-app[bot] Oct 2, 2025
5bd59e1
codegen metadata
stainless-app[bot] Oct 2, 2025
40bda56
codegen metadata
stainless-app[bot] Oct 2, 2025
53c1719
codegen metadata
stainless-app[bot] Oct 2, 2025
9add06c
codegen metadata
stainless-app[bot] Oct 2, 2025
25e5588
codegen metadata
stainless-app[bot] Oct 2, 2025
1ab97aa
codegen metadata
stainless-app[bot] Oct 2, 2025
e74d022
codegen metadata
stainless-app[bot] Oct 2, 2025
da0419b
codegen metadata
stainless-app[bot] Oct 2, 2025
ff9835d
codegen metadata
stainless-app[bot] Oct 2, 2025
ac66e6b
codegen metadata
stainless-app[bot] Oct 2, 2025
2efc2f8
codegen metadata
stainless-app[bot] Oct 2, 2025
3984ee3
codegen metadata
stainless-app[bot] Oct 2, 2025
c6223b6
chore(api): update composite API spec
stainless-app[bot] Oct 2, 2025
36ca7ff
chore(api): update composite API spec
stainless-app[bot] Oct 2, 2025
7476108
chore(api): update composite API spec
stainless-app[bot] Oct 2, 2025
e428a7a
chore(api): update composite API spec
stainless-app[bot] Oct 2, 2025
116e022
codegen metadata
stainless-app[bot] Oct 3, 2025
321a8de
codegen metadata
stainless-app[bot] Oct 3, 2025
796ea1c
codegen metadata
stainless-app[bot] Oct 3, 2025
37df388
codegen metadata
stainless-app[bot] Oct 3, 2025
9041e2c
codegen metadata
stainless-app[bot] Oct 3, 2025
2058e9d
codegen metadata
stainless-app[bot] Oct 3, 2025
3836b7d
chore(api): update composite API spec
stainless-app[bot] Oct 3, 2025
9f0c410
chore(api): update composite API spec
stainless-app[bot] Oct 3, 2025
68e6f6d
codegen metadata
stainless-app[bot] Oct 3, 2025
82cd4d8
codegen metadata
stainless-app[bot] Oct 3, 2025
fbf721a
codegen metadata
stainless-app[bot] Oct 3, 2025
74f7755
codegen metadata
stainless-app[bot] Oct 3, 2025
eb5a63f
codegen metadata
stainless-app[bot] Oct 3, 2025
0852a9f
codegen metadata
stainless-app[bot] Oct 3, 2025
12afc31
codegen metadata
stainless-app[bot] Oct 3, 2025
9b35372
codegen metadata
stainless-app[bot] Oct 3, 2025
1f0ce6b
codegen metadata
stainless-app[bot] Oct 3, 2025
2edb41d
chore(api): update composite API spec
stainless-app[bot] Oct 3, 2025
7f579af
chore(api): update composite API spec
stainless-app[bot] Oct 3, 2025
21d2e59
chore(api): update composite API spec
stainless-app[bot] Oct 3, 2025
fb19371
codegen metadata
stainless-app[bot] Oct 3, 2025
126ccde
codegen metadata
stainless-app[bot] Oct 3, 2025
61c4b54
codegen metadata
stainless-app[bot] Oct 3, 2025
c205076
codegen metadata
stainless-app[bot] Oct 3, 2025
a1a0bca
codegen metadata
stainless-app[bot] Oct 3, 2025
68db1cb
codegen metadata
stainless-app[bot] Oct 3, 2025
f4ed23f
codegen metadata
stainless-app[bot] Oct 3, 2025
c50c6a8
codegen metadata
stainless-app[bot] Oct 3, 2025
f5bb242
chore(api): update composite API spec
stainless-app[bot] Oct 4, 2025
4af62a6
codegen metadata
stainless-app[bot] Oct 4, 2025
3ee2b91
codegen metadata
stainless-app[bot] Oct 4, 2025
446738c
codegen metadata
stainless-app[bot] Oct 6, 2025
b7a3da3
codegen metadata
stainless-app[bot] Oct 6, 2025
cbdbcea
codegen metadata
stainless-app[bot] Oct 6, 2025
91bb2d6
codegen metadata
stainless-app[bot] Oct 6, 2025
440a394
codegen metadata
stainless-app[bot] Oct 6, 2025
c59e363
codegen metadata
stainless-app[bot] Oct 6, 2025
09ff1b7
codegen metadata
stainless-app[bot] Oct 6, 2025
fff491e
codegen metadata
stainless-app[bot] Oct 6, 2025
9889b9c
chore(api): update composite API spec
stainless-app[bot] Oct 6, 2025
b20eb56
codegen metadata
stainless-app[bot] Oct 6, 2025
c076a79
codegen metadata
stainless-app[bot] Oct 6, 2025
57f439a
codegen metadata
stainless-app[bot] Oct 6, 2025
a7130ac
codegen metadata
stainless-app[bot] Oct 6, 2025
344cd25
codegen metadata
stainless-app[bot] Oct 6, 2025
e41da0d
codegen metadata
stainless-app[bot] Oct 6, 2025
83e56e5
codegen metadata
stainless-app[bot] Oct 6, 2025
c8dbb2b
codegen metadata
stainless-app[bot] Oct 6, 2025
82bee03
codegen metadata
stainless-app[bot] Oct 6, 2025
f879d75
codegen metadata
stainless-app[bot] Oct 6, 2025
2d27072
codegen metadata
stainless-app[bot] Oct 6, 2025
527b97f
codegen metadata
stainless-app[bot] Oct 6, 2025
136c524
codegen metadata
stainless-app[bot] Oct 6, 2025
e2f1b60
codegen metadata
stainless-app[bot] Oct 6, 2025
1cf726b
chore(api): update composite API spec
stainless-app[bot] Oct 6, 2025
2f8c3e4
codegen metadata
stainless-app[bot] Oct 6, 2025
b72c54d
codegen metadata
stainless-app[bot] Oct 6, 2025
e7ed69d
codegen metadata
stainless-app[bot] Oct 6, 2025
1679f41
codegen metadata
stainless-app[bot] Oct 6, 2025
a9fe93a
codegen metadata
stainless-app[bot] Oct 6, 2025
449a57f
codegen metadata
stainless-app[bot] Oct 6, 2025
d49a3b4
codegen metadata
stainless-app[bot] Oct 6, 2025
95a9187
codegen metadata
stainless-app[bot] Oct 6, 2025
a3ceee3
codegen metadata
stainless-app[bot] Oct 6, 2025
577923d
codegen metadata
stainless-app[bot] Oct 6, 2025
16983e5
feat: fix(content_scanning): content scanning terraform resource
stainless-app[bot] Oct 6, 2025
4707553
codegen metadata
stainless-app[bot] Oct 6, 2025
b66d300
codegen metadata
stainless-app[bot] Oct 6, 2025
d74d4b8
codegen metadata
stainless-app[bot] Oct 6, 2025
e366354
codegen metadata
stainless-app[bot] Oct 6, 2025
3b0fe39
codegen metadata
stainless-app[bot] Oct 6, 2025
e0335d9
chore(api): update composite API spec
stainless-app[bot] Oct 6, 2025
482c0e9
codegen metadata
stainless-app[bot] Oct 6, 2025
0c4cf23
codegen metadata
stainless-app[bot] Oct 6, 2025
52424e3
codegen metadata
stainless-app[bot] Oct 7, 2025
10c56f8
chore(api): update composite API spec
stainless-app[bot] Oct 7, 2025
8ad3562
codegen metadata
stainless-app[bot] Oct 7, 2025
43e4cec
codegen metadata
stainless-app[bot] Oct 7, 2025
c2f29d0
codegen metadata
stainless-app[bot] Oct 7, 2025
44858c2
codegen metadata
stainless-app[bot] Oct 7, 2025
a2b92d5
codegen metadata
stainless-app[bot] Oct 7, 2025
9dabf51
codegen metadata
stainless-app[bot] Oct 7, 2025
8096c00
codegen metadata
stainless-app[bot] Oct 7, 2025
ab2dd1a
codegen metadata
stainless-app[bot] Oct 7, 2025
75d97a5
codegen metadata
stainless-app[bot] Oct 7, 2025
1c452eb
codegen metadata
stainless-app[bot] Oct 7, 2025
b4730fc
codegen metadata
stainless-app[bot] Oct 7, 2025
6859d5e
codegen metadata
stainless-app[bot] Oct 7, 2025
28b8270
codegen metadata
stainless-app[bot] Oct 7, 2025
92de059
codegen metadata
stainless-app[bot] Oct 7, 2025
065d93d
codegen metadata
stainless-app[bot] Oct 7, 2025
6488442
codegen metadata
stainless-app[bot] Oct 7, 2025
a143e82
codegen metadata
stainless-app[bot] Oct 7, 2025
ba25b1a
codegen metadata
stainless-app[bot] Oct 7, 2025
1be9c63
codegen metadata
stainless-app[bot] Oct 7, 2025
3451d38
codegen metadata
stainless-app[bot] Oct 7, 2025
75e7a73
codegen metadata
stainless-app[bot] Oct 7, 2025
393bf4d
codegen metadata
stainless-app[bot] Oct 7, 2025
c5f1fed
codegen metadata
stainless-app[bot] Oct 7, 2025
bda625c
codegen metadata
stainless-app[bot] Oct 7, 2025
06eb2a6
chore(api): update composite API spec
stainless-app[bot] Oct 7, 2025
3607151
codegen metadata
stainless-app[bot] Oct 7, 2025
5e77288
codegen metadata
stainless-app[bot] Oct 7, 2025
6e4d780
codegen metadata
stainless-app[bot] Oct 7, 2025
37f72b2
codegen metadata
stainless-app[bot] Oct 7, 2025
4b5d792
codegen metadata
stainless-app[bot] Oct 7, 2025
c5ac658
codegen metadata
stainless-app[bot] Oct 7, 2025
d9bb195
codegen metadata
stainless-app[bot] Oct 7, 2025
604a6af
codegen metadata
stainless-app[bot] Oct 7, 2025
52212da
codegen metadata
stainless-app[bot] Oct 7, 2025
24dba02
codegen metadata
stainless-app[bot] Oct 7, 2025
c882cba
chore(api): update composite API spec
stainless-app[bot] Oct 8, 2025
5c6c554
codegen metadata
stainless-app[bot] Oct 8, 2025
fd710a2
codegen metadata
stainless-app[bot] Oct 8, 2025
73f7a43
codegen metadata
stainless-app[bot] Oct 8, 2025
d6ed80e
codegen metadata
stainless-app[bot] Oct 8, 2025
343e0a1
codegen metadata
stainless-app[bot] Oct 8, 2025
0a039c1
codegen metadata
stainless-app[bot] Oct 8, 2025
fe6d493
codegen metadata
stainless-app[bot] Oct 8, 2025
e438299
codegen metadata
stainless-app[bot] Oct 8, 2025
21688cd
codegen metadata
stainless-app[bot] Oct 8, 2025
0c7463f
codegen metadata
stainless-app[bot] Oct 8, 2025
5b98f56
codegen metadata
stainless-app[bot] Oct 8, 2025
3805db3
chore(api): update composite API spec
stainless-app[bot] Oct 8, 2025
71a023c
chore(api): update composite API spec
stainless-app[bot] Oct 8, 2025
40238a7
codegen metadata
stainless-app[bot] Oct 8, 2025
05f017f
codegen metadata
stainless-app[bot] Oct 8, 2025
c40349d
codegen metadata
stainless-app[bot] Oct 8, 2025
c78ef5e
chore(api): update composite API spec
stainless-app[bot] Oct 8, 2025
9287b18
codegen metadata
stainless-app[bot] Oct 8, 2025
321d4bd
codegen metadata
stainless-app[bot] Oct 8, 2025
17b788b
codegen metadata
stainless-app[bot] Oct 8, 2025
b3a3cf6
chore(api): update composite API spec
stainless-app[bot] Oct 8, 2025
e227f40
codegen metadata
stainless-app[bot] Oct 8, 2025
e772716
codegen metadata
stainless-app[bot] Oct 8, 2025
8bfd778
codegen metadata
stainless-app[bot] Oct 8, 2025
67788e6
codegen metadata
stainless-app[bot] Oct 8, 2025
65382bf
chore(api): update composite API spec
stainless-app[bot] Oct 9, 2025
807d5b8
codegen metadata
stainless-app[bot] Oct 9, 2025
f5a4523
codegen metadata
stainless-app[bot] Oct 9, 2025
8244fcc
codegen metadata
stainless-app[bot] Oct 9, 2025
2f0f596
codegen metadata
stainless-app[bot] Oct 9, 2025
da679ef
codegen metadata
stainless-app[bot] Oct 9, 2025
047f07f
codegen metadata
stainless-app[bot] Oct 9, 2025
375c7e4
codegen metadata
stainless-app[bot] Oct 9, 2025
44fc019
codegen metadata
stainless-app[bot] Oct 9, 2025
b7f344e
codegen metadata
stainless-app[bot] Oct 9, 2025
fc648ce
codegen metadata
stainless-app[bot] Oct 9, 2025
119f889
chore(api): update composite API spec
stainless-app[bot] Oct 9, 2025
08d81e1
codegen metadata
stainless-app[bot] Oct 9, 2025
bcd1c71
codegen metadata
stainless-app[bot] Oct 9, 2025
d7f93e2
codegen metadata
stainless-app[bot] Oct 9, 2025
3c3adc5
feat: feat: SDKs for Organizations and OrganizationsProfile
stainless-app[bot] Oct 9, 2025
a027aa8
codegen metadata
stainless-app[bot] Oct 9, 2025
8403975
codegen metadata
stainless-app[bot] Oct 9, 2025
a0d18a9
codegen metadata
stainless-app[bot] Oct 9, 2025
ec90778
codegen metadata
stainless-app[bot] Oct 9, 2025
412ed20
chore(api): update composite API spec
stainless-app[bot] Oct 9, 2025
578a539
codegen metadata
stainless-app[bot] Oct 9, 2025
69adcaf
codegen metadata
stainless-app[bot] Oct 9, 2025
000870c
codegen metadata
stainless-app[bot] Oct 9, 2025
345d46b
codegen metadata
stainless-app[bot] Oct 9, 2025
c73b6d4
codegen metadata
stainless-app[bot] Oct 9, 2025
ef19bde
codegen metadata
stainless-app[bot] Oct 9, 2025
d292832
codegen metadata
stainless-app[bot] Oct 10, 2025
e1ab1d5
codegen metadata
stainless-app[bot] Oct 10, 2025
7443dba
codegen metadata
stainless-app[bot] Oct 10, 2025
2ddc5f6
codegen metadata
stainless-app[bot] Oct 10, 2025
1e75cf1
codegen metadata
stainless-app[bot] Oct 10, 2025
5df5038
codegen metadata
stainless-app[bot] Oct 10, 2025
cdf24f6
codegen metadata
stainless-app[bot] Oct 10, 2025
d6985cf
codegen metadata
stainless-app[bot] Oct 10, 2025
f135b69
codegen metadata
stainless-app[bot] Oct 10, 2025
65b50c0
codegen metadata
stainless-app[bot] Oct 10, 2025
ead01b6
codegen metadata
stainless-app[bot] Oct 10, 2025
0e5445c
codegen metadata
stainless-app[bot] Oct 10, 2025
c8e36e5
codegen metadata
stainless-app[bot] Oct 10, 2025
c686a51
chore(api): update composite API spec
stainless-app[bot] Oct 10, 2025
392c50f
codegen metadata
stainless-app[bot] Oct 10, 2025
9ec22ad
codegen metadata
stainless-app[bot] Oct 10, 2025
242b8b3
codegen metadata
stainless-app[bot] Oct 10, 2025
b3537d9
codegen metadata
stainless-app[bot] Oct 10, 2025
7f2bca9
codegen metadata
stainless-app[bot] Oct 10, 2025
6ed08c0
codegen metadata
stainless-app[bot] Oct 10, 2025
676f8b5
codegen metadata
stainless-app[bot] Oct 10, 2025
9e8dfa7
codegen metadata
stainless-app[bot] Oct 10, 2025
bc97b30
codegen metadata
stainless-app[bot] Oct 10, 2025
af1f147
codegen metadata
stainless-app[bot] Oct 10, 2025
821ec53
codegen metadata
stainless-app[bot] Oct 10, 2025
e87641f
codegen metadata
stainless-app[bot] Oct 10, 2025
c90093f
codegen metadata
stainless-app[bot] Oct 10, 2025
b9cb84c
codegen metadata
stainless-app[bot] Oct 10, 2025
1f8a4b6
codegen metadata
stainless-app[bot] Oct 10, 2025
70e068e
feat: feat(api): add mcp portals endpoints
stainless-app[bot] Oct 13, 2025
845fba2
feat: feat(radar): add new group by dimension endpoints; deprecate to…
stainless-app[bot] Oct 13, 2025
f9160a4
chore(api): update composite API spec
stainless-app[bot] Oct 13, 2025
19d1d96
chore(api): update composite API spec
stainless-app[bot] Oct 13, 2025
9fd6645
chore(api): update composite API spec
stainless-app[bot] Oct 13, 2025
3c18fd3
feat: docs(zero_trust_gateway_policy): add /rules/tenants endpoint to…
stainless-app[bot] Oct 13, 2025
fc06837
feat: feat: add connectivity directory service APIs to openapi.stainl…
stainless-app[bot] Oct 14, 2025
25d603f
chore(api): update composite API spec
stainless-app[bot] Oct 14, 2025
53d59f4
chore(api): update composite API spec
stainless-app[bot] Oct 14, 2025
7baa51c
chore(api): update composite API spec
stainless-app[bot] Oct 14, 2025
c10d1c9
codegen metadata
stainless-app[bot] Oct 14, 2025
19daccb
codegen metadata
stainless-app[bot] Oct 14, 2025
7361723
codegen metadata
stainless-app[bot] Oct 14, 2025
dd0b6fb
feat: chore(abuse): rename path parameter
stainless-app[bot] Oct 15, 2025
ba5b5fc
chore(api): update composite API spec
stainless-app[bot] Oct 21, 2025
fe3da6c
codegen metadata
stainless-app[bot] Oct 21, 2025
541c9fb
chore(api): update composite API spec
stainless-app[bot] Oct 22, 2025
aa1460b
codegen metadata
stainless-app[bot] Oct 22, 2025
5d19869
chore(api): update composite API spec
stainless-app[bot] Oct 22, 2025
5f5caef
chore(api): update composite API spec
stainless-app[bot] Oct 22, 2025
bd177bd
codegen metadata
stainless-app[bot] Oct 22, 2025
000f891
release: 5.0.0
stainless-app[bot] Oct 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
32 changes: 27 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
- 'integrated/**'
- 'stl-preview-head/**'
- 'stl-preview-base/**'
pull_request:
branches-ignore:
- 'stl-preview-head/**'
- 'stl-preview-base/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -18,6 +22,7 @@ jobs:
timeout-minutes: 10
name: lint
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4

Expand All @@ -35,24 +40,40 @@ jobs:
- name: Run lints
run: ./scripts/lint

upload:
if: github.repository == 'stainless-sdks/cloudflare-python'
build:
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
timeout-minutes: 10
name: upload
name: build
permissions:
contents: read
id-token: write
runs-on: depot-ubuntu-24.04
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v4

- name: Install Rye
run: |
curl -sSf https://rye.astral.sh/get | bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH
env:
RYE_VERSION: '0.44.0'
RYE_INSTALL_OPTION: '--yes'

- name: Install dependencies
run: rye sync --all-features

- name: Run build
run: rye build

- name: Get GitHub OIDC Token
if: github.repository == 'stainless-sdks/cloudflare-python'
id: github-oidc
uses: actions/github-script@v6
with:
script: core.setOutput('github_token', await core.getIDToken());

- name: Upload tarball
if: github.repository == 'stainless-sdks/cloudflare-python'
env:
URL: https://pkg.stainless.com/s
AUTH: ${{ steps.github-oidc.outputs.github_token }}
Expand All @@ -63,6 +84,7 @@ jobs:
timeout-minutes: 30
name: test
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4

Expand All @@ -84,7 +106,7 @@ jobs:
timeout-minutes: 10
name: examples
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.repository == 'cloudflare/cloudflare-python'
if: github.repository == 'cloudflare/cloudflare-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)

steps:
- uses: actions/checkout@v4
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/detect-breaking-changes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI
on:
pull_request:
branches:
- main
- next

jobs:
detect_breaking_changes:
runs-on: 'ubuntu-latest'
name: detect-breaking-changes
if: github.repository == 'cloudflare/cloudflare-python'
steps:
- name: Calculate fetch-depth
run: |
echo "FETCH_DEPTH=$(expr ${{ github.event.pull_request.commits }} + 1)" >> $GITHUB_ENV

- uses: actions/checkout@v4
with:
# Ensure we can check out the pull request base in the script below.
fetch-depth: ${{ env.FETCH_DEPTH }}

- name: Install Rye
run: |
curl -sSf https://rye.astral.sh/get | bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH
env:
RYE_VERSION: '0.44.0'
RYE_INSTALL_OPTION: '--yes'
- name: Install dependencies
run: |
rye sync --all-features
- name: Detect removed symbols
run: |
rye run python scripts/detect-breaking-changes.py "${{ github.event.pull_request.base.sha }}"

- name: Detect breaking changes
run: |
# Try to check out previous versions of the breaking change detection script. This ensures that
# we still detect breaking changes when entire files and their tests are removed.
git checkout "${{ github.event.pull_request.base.sha }}" -- ./scripts/detect-breaking-changes 2>/dev/null || true
./scripts/detect-breaking-changes ${{ github.event.pull_request.base.sha }}
Comment on lines +10 to +42

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 2 months ago

To fix this issue, we should explicitly set minimal required permissions for the workflow/job by adding a permissions block. The simplest and safest starting point is to set contents: read at the workflow level, as the steps only clone/checkout code and do not perform any write operations on issues, deployments, etc. This should be placed at the top level of the YAML file (directly below the name: or on: block) so all jobs inherit these permissions, unless overridden. No additional functionality is added or changed; this only restricts the escalated permissions that the workflow's GitHub token might inherit.


Suggested changeset 1
.github/workflows/detect-breaking-changes.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/detect-breaking-changes.yml b/.github/workflows/detect-breaking-changes.yml
--- a/.github/workflows/detect-breaking-changes.yml
+++ b/.github/workflows/detect-breaking-changes.yml
@@ -1,3 +1,5 @@
+permissions:
+  contents: read
 name: CI
 on:
   pull_request:
EOF
@@ -1,3 +1,5 @@
permissions:
contents: read
name: CI
on:
pull_request:
Copilot is powered by AI and may make mistakes. Always verify output.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.prism.log
.vscode
_dev

__pycache__
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "4.3.1"
".": "5.0.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 1752
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b15b44e0efd207de48e7e74e742b0b4b190c74f12a941a1a0ef59a51656a5224.yml
openapi_spec_hash: 83243c9ee06f88d0fa91e9b185d8a42e
config_hash: 8601d43fd5ccaf9e3d08f26748a5a63a
configured_endpoints: 1859
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7c981c72c3b84f1b39c664311bcc286c0965bf2833955853107bc1988cc5ff25.yml
openapi_spec_hash: d4b77a5657c299c78a79bb3e5b326fef
config_hash: e16fca6aff930b2279d586d92022f7d1
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python.analysis.importFormat": "relative",
}
62 changes: 62 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,67 @@
# Changelog

## 5.0.0 (2025-10-22)

Full Changelog: [v4.3.1...v5.0.0](https://github.com/cloudflare/cloudflare-python/compare/v4.3.1...v5.0.0)

### Features

* chore(abuse): rename path parameter ([dd0b6fb](https://github.com/cloudflare/cloudflare-python/commit/dd0b6fbd8042a4cde1625d945369b28d6e69bbb0))
* docs(zero_trust_gateway_policy): add /rules/tenants endpoint to Gateway API docs ([3c18fd3](https://github.com/cloudflare/cloudflare-python/commit/3c18fd307d5cf804eb9d68c8474d5ecc5f481a3e))
* feat: add connectivity directory service APIs to openapi.stainless.yml ([fc06837](https://github.com/cloudflare/cloudflare-python/commit/fc06837d768b4291bbaa1d9a5e0d3303d0a82ba1))
* feat: SDKs for Organizations and OrganizationsProfile ([3c3adc5](https://github.com/cloudflare/cloudflare-python/commit/3c3adc5853478da4154805746ac19ffa6e6b4b4e))
* feat(api): add mcp portals endpoints ([70e068e](https://github.com/cloudflare/cloudflare-python/commit/70e068e9497013d0c8d8e7689ae87b3beafeeb46))
* feat(radar): add new group by dimension endpoints; deprecate to_markdown endpoint ([845fba2](https://github.com/cloudflare/cloudflare-python/commit/845fba278d6d58c6b4b8de8fa54d02efdc4dddee))
* fix(ai): rename duplicate parameter in the to_markdown subresource ([e107db1](https://github.com/cloudflare/cloudflare-python/commit/e107db1913c43406acd175d54bc683c11c911bba))
* fix(api): RAG-286: Add to_markdown subresource to AI resource ([73fa6b1](https://github.com/cloudflare/cloudflare-python/commit/73fa6b1db9654ff802653cebe3aa0c05d182f68b))
* fix(content_scanning): content scanning terraform resource ([16983e5](https://github.com/cloudflare/cloudflare-python/commit/16983e574240d5656e5e32ffc0494627970a859e))


### Bug Fixes

* do not set headers with default to omit ([7b7b62f](https://github.com/cloudflare/cloudflare-python/commit/7b7b62fbc7caa0b81e2c828cb48b9fc137a1345c))


### Chores

* **api:** update composite API spec ([5f5caef](https://github.com/cloudflare/cloudflare-python/commit/5f5caef1eed2c6a2c5cd80b77c2c7e01e19e57fc))
* **api:** update composite API spec ([5d19869](https://github.com/cloudflare/cloudflare-python/commit/5d1986964f7344c79285a47c9bd4ae6928805ed5))
* **api:** update composite API spec ([541c9fb](https://github.com/cloudflare/cloudflare-python/commit/541c9fb7974741641bcef74ba99f7b54f142e0b1))
* **api:** update composite API spec ([ba5b5fc](https://github.com/cloudflare/cloudflare-python/commit/ba5b5fcd1936b0cadb189ba4c2c674dc6ec956e3))
* **api:** update composite API spec ([7baa51c](https://github.com/cloudflare/cloudflare-python/commit/7baa51ccf00f66c8871156e674214504984dc066))
* **api:** update composite API spec ([53d59f4](https://github.com/cloudflare/cloudflare-python/commit/53d59f439ba34edaf2628d89c2a1d7363693a38d))
* **api:** update composite API spec ([25d603f](https://github.com/cloudflare/cloudflare-python/commit/25d603f8cb36473107bb739c1217a10becd82302))
* **api:** update composite API spec ([9fd6645](https://github.com/cloudflare/cloudflare-python/commit/9fd66450b998a9b0bea72a8f3ac9fdcb26edd88a))
* **api:** update composite API spec ([19d1d96](https://github.com/cloudflare/cloudflare-python/commit/19d1d96bae88d6af838574218fc09b541a94da81))
* **api:** update composite API spec ([f9160a4](https://github.com/cloudflare/cloudflare-python/commit/f9160a47dec2c31bc7f591bc73bc9dff420d10f4))
* **api:** update composite API spec ([c686a51](https://github.com/cloudflare/cloudflare-python/commit/c686a511cc457bb92c7ba7e0c0593fe871b56744))
* **api:** update composite API spec ([412ed20](https://github.com/cloudflare/cloudflare-python/commit/412ed203f44de2e2c45996bb9382f6278f05fa55))
* **api:** update composite API spec ([119f889](https://github.com/cloudflare/cloudflare-python/commit/119f889eaf1bc73df1a6cb1e96c44aae289f5a7c))
* **api:** update composite API spec ([65382bf](https://github.com/cloudflare/cloudflare-python/commit/65382bf11bc785cb991cb57cbee6f0f6f155ad54))
* **api:** update composite API spec ([b3a3cf6](https://github.com/cloudflare/cloudflare-python/commit/b3a3cf678acf7db925104ecd3ecc2b68767b5081))
* **api:** update composite API spec ([c78ef5e](https://github.com/cloudflare/cloudflare-python/commit/c78ef5e952f7f7db180e312d7175188810ff6a95))
* **api:** update composite API spec ([71a023c](https://github.com/cloudflare/cloudflare-python/commit/71a023cf63064090e9aa27e08ac3b0ad6f468cde))
* **api:** update composite API spec ([3805db3](https://github.com/cloudflare/cloudflare-python/commit/3805db3abfdb8cb11dd13483f670f3264eec8360))
* **api:** update composite API spec ([c882cba](https://github.com/cloudflare/cloudflare-python/commit/c882cba3a638fd663068ba565bfd3bba9dd90aaf))
* **api:** update composite API spec ([06eb2a6](https://github.com/cloudflare/cloudflare-python/commit/06eb2a664feed8661b93b893a1cd00e268688a54))
* **api:** update composite API spec ([10c56f8](https://github.com/cloudflare/cloudflare-python/commit/10c56f863ddf61d3afd53d372a27aa548ad0c28e))
* **api:** update composite API spec ([e0335d9](https://github.com/cloudflare/cloudflare-python/commit/e0335d95451835f2dfbe7e8359cf896ce18c7477))
* **api:** update composite API spec ([1cf726b](https://github.com/cloudflare/cloudflare-python/commit/1cf726be6956545c246e4dc95bd424517c36c536))
* **api:** update composite API spec ([9889b9c](https://github.com/cloudflare/cloudflare-python/commit/9889b9c66902d2972c155d22c4555f627be1466a))
* **api:** update composite API spec ([f5bb242](https://github.com/cloudflare/cloudflare-python/commit/f5bb242a6cf35eaa836e55f4416c79ee6f69bdae))
* **api:** update composite API spec ([21d2e59](https://github.com/cloudflare/cloudflare-python/commit/21d2e59197addafe432fd98c5e87fac049bff5a9))
* **api:** update composite API spec ([7f579af](https://github.com/cloudflare/cloudflare-python/commit/7f579af8d53449c32d8e9b9811b0114846143e92))
* **api:** update composite API spec ([2edb41d](https://github.com/cloudflare/cloudflare-python/commit/2edb41d57375c44c0decab1b543107ef29c9e4fa))
* **api:** update composite API spec ([9f0c410](https://github.com/cloudflare/cloudflare-python/commit/9f0c41036972ebd198387db974ac3c745a31413d))
* **api:** update composite API spec ([3836b7d](https://github.com/cloudflare/cloudflare-python/commit/3836b7d0562b8eee8e5eadb3e767279100165558))
* **api:** update composite API spec ([e428a7a](https://github.com/cloudflare/cloudflare-python/commit/e428a7ab287a145089def4550e757166c9c0f5d7))
* **api:** update composite API spec ([7476108](https://github.com/cloudflare/cloudflare-python/commit/7476108e928740002fdb715ec6ebfd0b6e483385))
* **api:** update composite API spec ([36ca7ff](https://github.com/cloudflare/cloudflare-python/commit/36ca7ff17b14cbf5de4a0a402f7e0285f434db0f))
* **api:** update composite API spec ([c6223b6](https://github.com/cloudflare/cloudflare-python/commit/c6223b6cd102cd3cd90ec2fb78af0d747094c1d7))
* **api:** update composite API spec ([7e91dae](https://github.com/cloudflare/cloudflare-python/commit/7e91dae9b0671edb8e293d8b57e2fef73cb0addf))
* **api:** update composite API spec ([826266e](https://github.com/cloudflare/cloudflare-python/commit/826266e34574063bc1bc970c222b50fbcc0503c3))
* **api:** update composite API spec ([cd0aa66](https://github.com/cloudflare/cloudflare-python/commit/cd0aa6681605ed620578082640c37e50410eb136))

## 4.3.1 (2025-06-16)

Full Changelog: [v4.3.0...v4.3.1](https://github.com/cloudflare/cloudflare-python/compare/v4.3.0...v4.3.1)
Expand Down
40 changes: 38 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Cloudflare Python API library

[![PyPI version](https://img.shields.io/pypi/v/cloudflare.svg)](https://pypi.org/project/cloudflare/)
<!-- prettier-ignore -->
[![PyPI version](https://img.shields.io/pypi/v/cloudflare.svg?label=pypi%20(stable))](https://pypi.org/project/cloudflare/)

The Cloudflare Python library provides convenient access to the Cloudflare REST API from any Python 3.8+
application. The library includes type definitions for all request params and response fields,
Expand Down Expand Up @@ -70,6 +71,41 @@ asyncio.run(main())

Functionality between the synchronous and asynchronous clients is otherwise identical.

### With aiohttp

By default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.

You can enable this by installing `aiohttp`:

```sh
# install from PyPI
pip install cloudflare[aiohttp]
```

Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:

```python
import asyncio
from cloudflare import DefaultAioHttpClient
from cloudflare import AsyncCloudflare


async def main() -> None:
async with AsyncCloudflare(
api_token="Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY",
http_client=DefaultAioHttpClient(),
) as client:
zone = await client.zones.create(
account={"id": "023e105f4ecef8ad9ca31a8372d0c353"},
name="example.com",
type="full",
)
print(zone.id)


asyncio.run(main())
```

## Using types

Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:
Expand Down Expand Up @@ -244,7 +280,7 @@ client.with_options(max_retries=5).zones.get(
### Timeouts

By default requests time out after 1 minute. You can configure this with a `timeout` option,
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object:
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:

```python
from cloudflare import Cloudflare
Expand Down
Loading
Loading