Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
873 commits
Select commit Hold shift + click to select a range
d3c0690
codegen metadata
stainless-app[bot] Aug 7, 2025
9bee0a8
codegen metadata
stainless-app[bot] Aug 7, 2025
3f7e26d
codegen metadata
stainless-app[bot] Aug 7, 2025
9582934
codegen metadata
stainless-app[bot] Aug 7, 2025
4a7d32d
codegen metadata
stainless-app[bot] Aug 7, 2025
49c5552
codegen metadata
stainless-app[bot] Aug 7, 2025
be708f5
codegen metadata
stainless-app[bot] Aug 7, 2025
6600542
codegen metadata
stainless-app[bot] Aug 7, 2025
772aedb
codegen metadata
stainless-app[bot] Aug 8, 2025
51aac22
codegen metadata
stainless-app[bot] Aug 8, 2025
eecae32
codegen metadata
stainless-app[bot] Aug 8, 2025
18cb6b3
codegen metadata
stainless-app[bot] Aug 8, 2025
9fc8b31
codegen metadata
stainless-app[bot] Aug 8, 2025
8d1c023
codegen metadata
stainless-app[bot] Aug 8, 2025
86277db
codegen metadata
stainless-app[bot] Aug 8, 2025
3117368
codegen metadata
stainless-app[bot] Aug 8, 2025
3b9ea5d
feat(api): api update
stainless-app[bot] Aug 8, 2025
fa0b676
codegen metadata
stainless-app[bot] Aug 8, 2025
c8ae192
codegen metadata
stainless-app[bot] Aug 8, 2025
78661c3
codegen metadata
stainless-app[bot] Aug 8, 2025
041aba6
codegen metadata
stainless-app[bot] Aug 8, 2025
8378dd0
codegen metadata
stainless-app[bot] Aug 8, 2025
7bfd28f
codegen metadata
stainless-app[bot] Aug 8, 2025
a1e726e
chore: update @stainless-api/prism-cli to v5.15.0
stainless-app[bot] Aug 8, 2025
562f4e7
codegen metadata
stainless-app[bot] Aug 8, 2025
aa0b329
codegen metadata
stainless-app[bot] Aug 8, 2025
29eeab3
codegen metadata
stainless-app[bot] Aug 8, 2025
e449e47
feat(api): api update
stainless-app[bot] Aug 8, 2025
73c752b
codegen metadata
stainless-app[bot] Aug 8, 2025
1c14611
codegen metadata
stainless-app[bot] Aug 8, 2025
2526d05
codegen metadata
stainless-app[bot] Aug 8, 2025
cf3a21e
chore(internal): detect breaking changes when removing endpoints
stainless-app[bot] Aug 8, 2025
7477489
chore(api): upload stainless config from cloudflare-config
stainless-app[bot] Aug 8, 2025
8f64f5f
chore(internal): update comment in script
stainless-app[bot] Aug 8, 2025
410146f
codegen metadata
stainless-app[bot] Aug 8, 2025
d46c5af
codegen metadata
stainless-app[bot] Aug 8, 2025
a051a1a
codegen metadata
stainless-app[bot] Aug 9, 2025
7c1787d
codegen metadata
stainless-app[bot] Aug 9, 2025
49ea1e3
codegen metadata
stainless-app[bot] Aug 10, 2025
97ef71e
codegen metadata
stainless-app[bot] Aug 11, 2025
f4a0e39
codegen metadata
stainless-app[bot] Aug 11, 2025
fa39008
codegen metadata
stainless-app[bot] Aug 11, 2025
950193e
codegen metadata
stainless-app[bot] Aug 11, 2025
f8282eb
codegen metadata
stainless-app[bot] Aug 11, 2025
b20d895
feat(api): api update
stainless-app[bot] Aug 11, 2025
02bb247
codegen metadata
stainless-app[bot] Aug 11, 2025
080e338
codegen metadata
stainless-app[bot] Aug 11, 2025
e4f6db1
feat(api): api update
stainless-app[bot] Aug 11, 2025
30efe43
codegen metadata
stainless-app[bot] Aug 11, 2025
31b69b8
codegen metadata
stainless-app[bot] Aug 11, 2025
6bee693
codegen metadata
stainless-app[bot] Aug 11, 2025
8c733e8
codegen metadata
stainless-app[bot] Aug 11, 2025
c8b84c8
codegen metadata
stainless-app[bot] Aug 11, 2025
d79454a
codegen metadata
stainless-app[bot] Aug 11, 2025
54b30b1
codegen metadata
stainless-app[bot] Aug 11, 2025
43bcfe1
codegen metadata
stainless-app[bot] Aug 11, 2025
dc60d1f
codegen metadata
stainless-app[bot] Aug 11, 2025
e9401b4
codegen metadata
stainless-app[bot] Aug 11, 2025
dcdce96
codegen metadata
stainless-app[bot] Aug 11, 2025
f587c98
codegen metadata
stainless-app[bot] Aug 11, 2025
a6720f5
feat(api): api update
stainless-app[bot] Aug 11, 2025
13aaaf8
codegen metadata
stainless-app[bot] Aug 11, 2025
df1ea9b
codegen metadata
stainless-app[bot] Aug 11, 2025
73c642d
codegen metadata
stainless-app[bot] Aug 11, 2025
81796e7
codegen metadata
stainless-app[bot] Aug 11, 2025
8570679
feat(api): api update
stainless-app[bot] Aug 11, 2025
c3f510c
feat(api): api update
stainless-app[bot] Aug 11, 2025
9e35d23
feat(api): api update
stainless-app[bot] Aug 11, 2025
e46ab45
codegen metadata
stainless-app[bot] Aug 11, 2025
d68eb0b
codegen metadata
stainless-app[bot] Aug 11, 2025
86d177b
codegen metadata
stainless-app[bot] Aug 11, 2025
1747166
codegen metadata
stainless-app[bot] Aug 11, 2025
c0bf1f3
codegen metadata
stainless-app[bot] Aug 11, 2025
4acc106
codegen metadata
stainless-app[bot] Aug 11, 2025
282793c
codegen metadata
stainless-app[bot] Aug 11, 2025
04032a7
codegen metadata
stainless-app[bot] Aug 11, 2025
6e2a4c8
codegen metadata
stainless-app[bot] Aug 11, 2025
96dd75c
codegen metadata
stainless-app[bot] Aug 11, 2025
a76ac03
codegen metadata
stainless-app[bot] Aug 12, 2025
2439e6f
feat(api): api update
stainless-app[bot] Aug 12, 2025
1107896
codegen metadata
stainless-app[bot] Aug 12, 2025
af66067
feat(api): api update
stainless-app[bot] Aug 12, 2025
24bfb4d
codegen metadata
stainless-app[bot] Aug 12, 2025
12167db
codegen metadata
stainless-app[bot] Aug 12, 2025
924f630
codegen metadata
stainless-app[bot] Aug 12, 2025
05b795b
codegen metadata
stainless-app[bot] Aug 12, 2025
2580c2d
codegen metadata
stainless-app[bot] Aug 12, 2025
9dd5c70
codegen metadata
stainless-app[bot] Aug 12, 2025
9f57ff4
codegen metadata
stainless-app[bot] Aug 12, 2025
490c474
codegen metadata
stainless-app[bot] Aug 12, 2025
0ac5a45
codegen metadata
stainless-app[bot] Aug 12, 2025
27dcdf9
codegen metadata
stainless-app[bot] Aug 12, 2025
91c3a53
codegen metadata
stainless-app[bot] Aug 12, 2025
1eae20b
codegen metadata
stainless-app[bot] Aug 12, 2025
2f4f8a9
codegen metadata
stainless-app[bot] Aug 12, 2025
fc9fb01
codegen metadata
stainless-app[bot] Aug 12, 2025
c79d831
codegen metadata
stainless-app[bot] Aug 12, 2025
b115142
feat(api): api update
stainless-app[bot] Aug 12, 2025
bfa56fb
codegen metadata
stainless-app[bot] Aug 12, 2025
65c576c
codegen metadata
stainless-app[bot] Aug 12, 2025
78034ba
feat(api): api update
stainless-app[bot] Aug 12, 2025
f4b8ab1
codegen metadata
stainless-app[bot] Aug 12, 2025
bd9776b
codegen metadata
stainless-app[bot] Aug 12, 2025
6353be6
codegen metadata
stainless-app[bot] Aug 12, 2025
725d375
codegen metadata
stainless-app[bot] Aug 12, 2025
85fe55a
codegen metadata
stainless-app[bot] Aug 12, 2025
c116216
codegen metadata
stainless-app[bot] Aug 12, 2025
fef2d52
codegen metadata
stainless-app[bot] Aug 12, 2025
8f6824a
codegen metadata
stainless-app[bot] Aug 12, 2025
5ec55ef
codegen metadata
stainless-app[bot] Aug 12, 2025
58a95e5
codegen metadata
stainless-app[bot] Aug 12, 2025
9a383ab
feat(api): api update
stainless-app[bot] Aug 12, 2025
1c6167c
codegen metadata
stainless-app[bot] Aug 12, 2025
6b38219
feat(api): api update
stainless-app[bot] Aug 12, 2025
98f5a49
codegen metadata
stainless-app[bot] Aug 12, 2025
ceef2bf
codegen metadata
stainless-app[bot] Aug 13, 2025
fbb869b
codegen metadata
stainless-app[bot] Aug 13, 2025
52f8e71
codegen metadata
stainless-app[bot] Aug 13, 2025
2bf7ec6
feat(api): api update
stainless-app[bot] Aug 13, 2025
246a724
codegen metadata
stainless-app[bot] Aug 13, 2025
6c49455
codegen metadata
stainless-app[bot] Aug 13, 2025
5d69c85
codegen metadata
stainless-app[bot] Aug 13, 2025
469282a
codegen metadata
stainless-app[bot] Aug 13, 2025
2bbe521
codegen metadata
stainless-app[bot] Aug 13, 2025
0a37a07
codegen metadata
stainless-app[bot] Aug 13, 2025
7028488
codegen metadata
stainless-app[bot] Aug 13, 2025
dbf2825
codegen metadata
stainless-app[bot] Aug 13, 2025
91a8f60
chore(api): upload stainless config from cloudflare-config
stainless-app[bot] Aug 14, 2025
4593272
codegen metadata
stainless-app[bot] Aug 14, 2025
0962510
chore(api): upload stainless config from cloudflare-config
stainless-app[bot] Aug 14, 2025
4bdc67a
chore(internal): improve breaking change detection
stainless-app[bot] Aug 19, 2025
d7de81f
codegen metadata
stainless-app[bot] Aug 19, 2025
e3e1940
feat(api): api update
stainless-app[bot] Aug 20, 2025
b9a374a
codegen metadata
stainless-app[bot] Aug 20, 2025
ee6eb4d
codegen metadata
stainless-app[bot] Aug 20, 2025
a507923
codegen metadata
stainless-app[bot] Aug 20, 2025
ecddba4
feat(api): api update
stainless-app[bot] Aug 20, 2025
04b69f3
chore(api): upload stainless config from cloudflare-config
stainless-app[bot] Aug 20, 2025
f59cd16
feat(api): api update
stainless-app[bot] Aug 20, 2025
efe9f5a
codegen metadata
stainless-app[bot] Aug 20, 2025
1a7cf3e
codegen metadata
stainless-app[bot] Aug 20, 2025
14432fe
codegen metadata
stainless-app[bot] Aug 20, 2025
1936438
codegen metadata
stainless-app[bot] Aug 20, 2025
9505003
feat(api): api update
stainless-app[bot] Aug 20, 2025
54ac6cc
codegen metadata
stainless-app[bot] Aug 20, 2025
22575cb
codegen metadata
stainless-app[bot] Aug 20, 2025
ece4adb
codegen metadata
stainless-app[bot] Aug 20, 2025
0ad0926
codegen metadata
stainless-app[bot] Aug 20, 2025
30d2217
codegen metadata
stainless-app[bot] Aug 20, 2025
bfab4a3
codegen metadata
stainless-app[bot] Aug 20, 2025
8d77d6b
codegen metadata
stainless-app[bot] Aug 20, 2025
3a35ffd
chore: update github action
stainless-app[bot] Aug 21, 2025
cb9ce20
chore(api): upload stainless config from cloudflare-config
stainless-app[bot] Aug 21, 2025
2b3a510
feat(api): api update
stainless-app[bot] Aug 22, 2025
f24bee7
fix: update singularization rules
stainless-app[bot] Aug 22, 2025
aeff4dd
chore(api): upload stainless config from cloudflare-config
stainless-app[bot] Aug 22, 2025
79da026
chore(api): upload stainless config from cloudflare-config
stainless-app[bot] Aug 22, 2025
0c4a2d1
codegen metadata
stainless-app[bot] Aug 22, 2025
7bda216
codegen metadata
stainless-app[bot] Aug 23, 2025
b89b811
feat(api): api update
stainless-app[bot] Aug 25, 2025
51ef16f
codegen metadata
stainless-app[bot] Aug 25, 2025
e7312f7
codegen metadata
stainless-app[bot] Aug 25, 2025
cf91922
codegen metadata
stainless-app[bot] Aug 25, 2025
3f99e67
codegen metadata
stainless-app[bot] Aug 25, 2025
9dc78e4
codegen metadata
stainless-app[bot] Aug 25, 2025
fa87ed4
codegen metadata
stainless-app[bot] Aug 25, 2025
35fa46f
feat(api): api update
stainless-app[bot] Aug 25, 2025
cfc306c
codegen metadata
stainless-app[bot] Aug 25, 2025
cf5a8d3
feat(api): api update
stainless-app[bot] Aug 25, 2025
62ac5d8
feat(api): api update
stainless-app[bot] Aug 25, 2025
495dc68
codegen metadata
stainless-app[bot] Aug 25, 2025
6185ace
codegen metadata
stainless-app[bot] Aug 25, 2025
0d020c3
Merge pull request #148 from stainless-sdks/robert/fix-multipart
RobertCraigie Aug 25, 2025
54095db
codegen metadata
stainless-app[bot] Aug 25, 2025
1abdbfd
codegen metadata
stainless-app[bot] Aug 25, 2025
e2a5229
chore(api): upload stainless config from cloudflare-config
stainless-app[bot] Aug 25, 2025
f40aace
feat(api): api update
stainless-app[bot] Aug 25, 2025
5489bd9
feat(api): api update
stainless-app[bot] Aug 25, 2025
b597a6c
codegen metadata
stainless-app[bot] Aug 25, 2025
4eb4df8
codegen metadata
stainless-app[bot] Aug 25, 2025
a07f998
codegen metadata
stainless-app[bot] Aug 25, 2025
c723f1e
chore(internal): change ci workflow machines
stainless-app[bot] Aug 25, 2025
a711fce
feat(api): api update
stainless-app[bot] Aug 25, 2025
6252572
codegen metadata
stainless-app[bot] Aug 25, 2025
52b30ec
codegen metadata
stainless-app[bot] Aug 26, 2025
1b06a50
codegen metadata
stainless-app[bot] Aug 26, 2025
64f325e
codegen metadata
stainless-app[bot] Aug 26, 2025
ff105bb
feat(api): api update
stainless-app[bot] Aug 26, 2025
c93fbd0
codegen metadata
stainless-app[bot] Aug 26, 2025
f1555e9
feat(api): api update
stainless-app[bot] Aug 26, 2025
60687ae
codegen metadata
stainless-app[bot] Aug 26, 2025
af106a6
codegen metadata
stainless-app[bot] Aug 26, 2025
079c03b
feat(api): api update
stainless-app[bot] Aug 26, 2025
488949a
fix: avoid newer type syntax
stainless-app[bot] Aug 26, 2025
e84978b
codegen metadata
stainless-app[bot] Aug 26, 2025
3df02e3
codegen metadata
stainless-app[bot] Aug 26, 2025
346ea93
codegen metadata
stainless-app[bot] Aug 26, 2025
6289f05
codegen metadata
stainless-app[bot] Aug 26, 2025
0878824
codegen metadata
stainless-app[bot] Aug 26, 2025
6598c7c
codegen metadata
stainless-app[bot] Aug 26, 2025
aa5f4b1
codegen metadata
stainless-app[bot] Aug 26, 2025
e53233d
codegen metadata
stainless-app[bot] Aug 26, 2025
11b888c
codegen metadata
stainless-app[bot] Aug 26, 2025
4306161
codegen metadata
stainless-app[bot] Aug 26, 2025
d693b56
codegen metadata
stainless-app[bot] Aug 26, 2025
56fc25a
feat(api): api update
stainless-app[bot] Aug 26, 2025
abb1e1d
chore(internal): update pyright exclude list
stainless-app[bot] Aug 26, 2025
421a68d
codegen metadata
stainless-app[bot] Aug 27, 2025
68ba7ab
feat(api): api update
stainless-app[bot] Aug 27, 2025
7ecd5a8
codegen metadata
stainless-app[bot] Aug 27, 2025
184de4b
codegen metadata
stainless-app[bot] Aug 27, 2025
8025668
codegen metadata
stainless-app[bot] Aug 27, 2025
ff19d67
codegen metadata
stainless-app[bot] Aug 27, 2025
b2f8765
chore(internal): minor formatting change
stainless-app[bot] Aug 27, 2025
caeddff
feat(api): api update
stainless-app[bot] Aug 27, 2025
45772c9
codegen metadata
stainless-app[bot] Aug 27, 2025
ba98c8f
feat(api): api update
stainless-app[bot] Aug 27, 2025
09987ef
codegen metadata
stainless-app[bot] Aug 27, 2025
04d9673
codegen metadata
stainless-app[bot] Aug 27, 2025
ed4999c
codegen metadata
stainless-app[bot] Aug 27, 2025
773e38e
feat(api): api update
stainless-app[bot] Aug 27, 2025
a252d83
codegen metadata
stainless-app[bot] Aug 27, 2025
2986e58
codegen metadata
stainless-app[bot] Aug 27, 2025
32f2027
codegen metadata
stainless-app[bot] Aug 27, 2025
9429fcc
codegen metadata
stainless-app[bot] Aug 27, 2025
927b62d
codegen metadata
stainless-app[bot] Aug 27, 2025
954479f
codegen metadata
stainless-app[bot] Aug 27, 2025
4d08bbe
codegen metadata
stainless-app[bot] Aug 27, 2025
a2ac463
codegen metadata
stainless-app[bot] Aug 27, 2025
426746c
codegen metadata
stainless-app[bot] Aug 27, 2025
7fc5b2f
codegen metadata
stainless-app[bot] Aug 27, 2025
0760270
codegen metadata
stainless-app[bot] Aug 27, 2025
913e107
codegen metadata
stainless-app[bot] Aug 27, 2025
2282740
feat(api): api update
stainless-app[bot] Aug 28, 2025
0176830
codegen metadata
stainless-app[bot] Aug 29, 2025
005b184
chore(internal): add Sequence related utils
stainless-app[bot] Aug 29, 2025
92d2466
codegen metadata
stainless-app[bot] Aug 30, 2025
d6ccbb2
codegen metadata
stainless-app[bot] Sep 2, 2025
67ceb0e
feat(types): replace List[str] with SequenceNotStr in params
stainless-app[bot] Sep 2, 2025
076307a
codegen metadata
stainless-app[bot] Sep 2, 2025
813dd68
feat: improve future compat with pydantic v3
stainless-app[bot] Sep 3, 2025
4df020f
chore(internal): move mypy configurations to `pyproject.toml` file
stainless-app[bot] Sep 4, 2025
9414525
fix: correctly handle sending multipart/form-data requests with JSON
1000hz Sep 4, 2025
7ea0926
Merge pull request #2674 from 1000hz/cina/fix-multipart-json
musa-cf Sep 4, 2025
5fbdcbf
feat: Merge branch 'vaishak/skip-worker-test' into 'main'
stainless-app[bot] Sep 11, 2025
94440c3
chore(internal): codegen related update
stainless-app[bot] Sep 11, 2025
d35fa67
chore(tests): simplify `get_platform` test
stainless-app[bot] Sep 11, 2025
ff43c4b
fix(types): add missing types to method arguments
stainless-app[bot] Sep 11, 2025
f36fac4
codegen metadata
stainless-app[bot] Sep 11, 2025
5673a9d
release: 5.0.0
stainless-app[bot] Sep 11, 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 24 days 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: 1809
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-77d61495fecd0d26b9adff1af0ab3510b06a3cc2c6781b9a40aabcad2f10588a.yml
openapi_spec_hash: 95dee3be411dda77306a41dc7d49eb35
config_hash: ac04197a992afb1d8c3b416fc46e8c8e
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",
}
95 changes: 95 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,100 @@
# Changelog

## 5.0.0 (2025-09-11)

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

### Features

* **api:** api update ([2282740](https://github.com/cloudflare/cloudflare-python/commit/228274041eeae42334b3c836d13ea70ac4995b95))
* **api:** api update ([773e38e](https://github.com/cloudflare/cloudflare-python/commit/773e38e475ebea25ef3391f2895ee8da120e71cd))
* **api:** api update ([ba98c8f](https://github.com/cloudflare/cloudflare-python/commit/ba98c8f013ea36ab95d748ed2859e1cc0973240f))
* **api:** api update ([caeddff](https://github.com/cloudflare/cloudflare-python/commit/caeddffdfe5793d627977fd88f20c0c5cc9da7f4))
* **api:** api update ([68ba7ab](https://github.com/cloudflare/cloudflare-python/commit/68ba7ab38d5ad79a521934c0b873620bb32e2cb0))
* **api:** api update ([56fc25a](https://github.com/cloudflare/cloudflare-python/commit/56fc25a52184378fc97ea666bde49f0ca136d2d3))
* **api:** api update ([079c03b](https://github.com/cloudflare/cloudflare-python/commit/079c03b30b648b26377eccc69633f73e9520453f))
* **api:** api update ([f1555e9](https://github.com/cloudflare/cloudflare-python/commit/f1555e9c9771824ca1a4d4b4adf3b4abf47d4bde))
* **api:** api update ([ff105bb](https://github.com/cloudflare/cloudflare-python/commit/ff105bb616196a5493162d5aa70790c29cecdda3))
* **api:** api update ([a711fce](https://github.com/cloudflare/cloudflare-python/commit/a711fceba44cce4c72a0ba356a9d95d6ebb713b8))
* **api:** api update ([5489bd9](https://github.com/cloudflare/cloudflare-python/commit/5489bd9ed67258aa4fe243da3cea3eca8021a12a))
* **api:** api update ([f40aace](https://github.com/cloudflare/cloudflare-python/commit/f40aace1473d562d1c7fbe940d9431ea5d68c30a))
* **api:** api update ([62ac5d8](https://github.com/cloudflare/cloudflare-python/commit/62ac5d80524f97037e26a73971ea9872597016ad))
* **api:** api update ([cf5a8d3](https://github.com/cloudflare/cloudflare-python/commit/cf5a8d3be26d200243f16b6a2047566ed0297113))
* **api:** api update ([35fa46f](https://github.com/cloudflare/cloudflare-python/commit/35fa46fc9577a0012ba0bdf87389b67d43e2b7d8))
* **api:** api update ([b89b811](https://github.com/cloudflare/cloudflare-python/commit/b89b811b7bc58c2432573ab5a36e1b6a59b5233c))
* **api:** api update ([2b3a510](https://github.com/cloudflare/cloudflare-python/commit/2b3a5102b9e2b2bface220613ab96325cbf1d8ec))
* **api:** api update ([9505003](https://github.com/cloudflare/cloudflare-python/commit/950500376cf65b62595b832fbb1aabb9a7f01240))
* **api:** api update ([f59cd16](https://github.com/cloudflare/cloudflare-python/commit/f59cd16fd49f26967ede3f790ab71dbe63307a44))
* **api:** api update ([ecddba4](https://github.com/cloudflare/cloudflare-python/commit/ecddba47c9009d50996e0dc20d1abec160b1e385))
* **api:** api update ([e3e1940](https://github.com/cloudflare/cloudflare-python/commit/e3e1940e4b0def7eb16b6dac4568dd73594f9420))
* **api:** api update ([2bf7ec6](https://github.com/cloudflare/cloudflare-python/commit/2bf7ec640e0cb0e3d809b37b58a429794b12d617))
* **api:** api update ([6b38219](https://github.com/cloudflare/cloudflare-python/commit/6b38219e064393068404b17eb36799e4921d16c9))
* **api:** api update ([9a383ab](https://github.com/cloudflare/cloudflare-python/commit/9a383aba94cbfd597107abf58979ce946d72b9a1))
* **api:** api update ([78034ba](https://github.com/cloudflare/cloudflare-python/commit/78034ba1680989c16fba7c47599d1d4dbe76e843))
* **api:** api update ([b115142](https://github.com/cloudflare/cloudflare-python/commit/b115142726fafa5d1f77d4da0751b07e05d569ea))
* **api:** api update ([af66067](https://github.com/cloudflare/cloudflare-python/commit/af66067fdbc10da9ca865c75c2ca2760a9c870ec))
* **api:** api update ([2439e6f](https://github.com/cloudflare/cloudflare-python/commit/2439e6fef1cf995510c5d90e598455e3a54a6b95))
* **api:** api update ([9e35d23](https://github.com/cloudflare/cloudflare-python/commit/9e35d237a01bc6530dd6667c2f51879e282e1e63))
* **api:** api update ([c3f510c](https://github.com/cloudflare/cloudflare-python/commit/c3f510c0602e4756e907991fa933f8fd14602d7f))
* **api:** api update ([8570679](https://github.com/cloudflare/cloudflare-python/commit/85706796ecb7e7107b072c9bfcaf7a45d30b51d5))
* **api:** api update ([a6720f5](https://github.com/cloudflare/cloudflare-python/commit/a6720f52cd03b6aefd8cfb3450fe64062c34405e))
* **api:** api update ([e4f6db1](https://github.com/cloudflare/cloudflare-python/commit/e4f6db131b8c4c0ce3125fa8a76fe1ec0ecfbae9))
* **api:** api update ([b20d895](https://github.com/cloudflare/cloudflare-python/commit/b20d89591b9e8090948a76c745a5cdbb7e00267a))
* **api:** api update ([e449e47](https://github.com/cloudflare/cloudflare-python/commit/e449e47e8a68b54ca5ea09b868c40cdecd3e15c7))
* **api:** api update ([3b9ea5d](https://github.com/cloudflare/cloudflare-python/commit/3b9ea5d0c69edfe53123243b927e096f1157e88a))
* **api:** api update ([9fff7a0](https://github.com/cloudflare/cloudflare-python/commit/9fff7a0346574783ea17c6bd459f9a58a039c584))
* **api:** api update ([9f1f4b0](https://github.com/cloudflare/cloudflare-python/commit/9f1f4b0c08551204165be1560cdd1b3091037a8e))
* **api:** api update ([5698cb6](https://github.com/cloudflare/cloudflare-python/commit/5698cb6425b2b3c689aac42e6a474083e16c688d))
* **api:** api update ([5662a87](https://github.com/cloudflare/cloudflare-python/commit/5662a87c01b857d54338e3ccff69474d2c14b491))
* **api:** api update ([dd641c8](https://github.com/cloudflare/cloudflare-python/commit/dd641c805298a6e7545f49fde23d9dbc82d006cc))
* improve future compat with pydantic v3 ([813dd68](https://github.com/cloudflare/cloudflare-python/commit/813dd685ebe2158929bd275c58ad2979ef89b879))
* Merge branch 'vaishak/skip-worker-test' into 'main' ([5fbdcbf](https://github.com/cloudflare/cloudflare-python/commit/5fbdcbfcb20b6560bdb1606e3270c3995e5ab7d3))
* **types:** replace List[str] with SequenceNotStr in params ([67ceb0e](https://github.com/cloudflare/cloudflare-python/commit/67ceb0e8c838edf6b77afb06f2b740dcaa2b780b))


### Bug Fixes

* avoid newer type syntax ([488949a](https://github.com/cloudflare/cloudflare-python/commit/488949a0005f9e6f66cfc7c84ad1e0585f389ada))
* correctly handle sending multipart/form-data requests with JSON ([9414525](https://github.com/cloudflare/cloudflare-python/commit/94145255688804027a169472353834357eaa8893))
* **types:** add missing types to method arguments ([ff43c4b](https://github.com/cloudflare/cloudflare-python/commit/ff43c4b71a54b020dab8f66853afacf8df5edfc4))
* update singularization rules ([f24bee7](https://github.com/cloudflare/cloudflare-python/commit/f24bee7a34a7bda1d1b44b5a63ef707bb3ab055b))


### Chores

* **api:** upload stainless config from cloudflare-config ([e2a5229](https://github.com/cloudflare/cloudflare-python/commit/e2a5229b4672a99b4414bb0ad0764e10ea90359f))
* **api:** upload stainless config from cloudflare-config ([79da026](https://github.com/cloudflare/cloudflare-python/commit/79da026c61e3d087dbee4f16261ab918ae2c5f4c))
* **api:** upload stainless config from cloudflare-config ([aeff4dd](https://github.com/cloudflare/cloudflare-python/commit/aeff4dd664312737c4dc908a6441395b3d144224))
* **api:** upload stainless config from cloudflare-config ([cb9ce20](https://github.com/cloudflare/cloudflare-python/commit/cb9ce202d226e30e1ef7fa033b74c2e37db1682a))
* **api:** upload stainless config from cloudflare-config ([04b69f3](https://github.com/cloudflare/cloudflare-python/commit/04b69f322eae243c963540a5d9bed1c462c26e44))
* **api:** upload stainless config from cloudflare-config ([0962510](https://github.com/cloudflare/cloudflare-python/commit/096251086c13e2e03de5f4ea17da5cfa3b271c3f))
* **api:** upload stainless config from cloudflare-config ([91a8f60](https://github.com/cloudflare/cloudflare-python/commit/91a8f6028e0a24f600b8aa0dac183fa7bb40ee6a))
* **api:** upload stainless config from cloudflare-config ([7477489](https://github.com/cloudflare/cloudflare-python/commit/74774897bf9f410ea8a9cc17e9ae2b1890f6a2d0))
* **api:** upload stainless config from cloudflare-config ([cadee02](https://github.com/cloudflare/cloudflare-python/commit/cadee02a6b85c5973f3ecdc6b2d9f36466bef915))
* **api:** upload stainless config from cloudflare-config ([f6cb2e1](https://github.com/cloudflare/cloudflare-python/commit/f6cb2e1a3a0df41f786b2cd9fa10426b9e5d6328))
* **api:** upload stainless config from cloudflare-config ([649bc99](https://github.com/cloudflare/cloudflare-python/commit/649bc9915fb21e3b35ad7d5664c1893b1e55c3c1))
* **api:** upload stainless config from cloudflare-config ([6cbf008](https://github.com/cloudflare/cloudflare-python/commit/6cbf008e22076e1a5b00a422c11e3fa000a324c1))
* **api:** upload stainless config from cloudflare-config ([fcff175](https://github.com/cloudflare/cloudflare-python/commit/fcff1758c1e91d6f9ad3b91914395e664f629dcf))
* **api:** upload stainless config from cloudflare-config ([c019dae](https://github.com/cloudflare/cloudflare-python/commit/c019dae16f08a5e964e9c9ad27e8013afbfdb52c))
* **api:** upload stainless config from cloudflare-config ([1e499f3](https://github.com/cloudflare/cloudflare-python/commit/1e499f38ecbdf0398bf5143db2200952ff07adc3))
* **api:** upload stainless config from cloudflare-config ([6464b31](https://github.com/cloudflare/cloudflare-python/commit/6464b318e163995e744c6d59064cc8d912835230))
* **api:** upload stainless config from cloudflare-config ([6a1b4d4](https://github.com/cloudflare/cloudflare-python/commit/6a1b4d4184d20adf92b05d65752ecd9d5218972a))
* **api:** upload stainless config from cloudflare-config ([9f4226d](https://github.com/cloudflare/cloudflare-python/commit/9f4226de0aac877922578b036ac6502add00c651))
* **api:** upload stainless config from cloudflare-config ([dc18093](https://github.com/cloudflare/cloudflare-python/commit/dc180939633e6568ea205ff993b07265464f082a))
* **api:** upload stainless config from cloudflare-config ([a4b55b1](https://github.com/cloudflare/cloudflare-python/commit/a4b55b1fe9212b25ea2e808b07379e05c686fe15))
* **internal:** add Sequence related utils ([005b184](https://github.com/cloudflare/cloudflare-python/commit/005b184f6464a330758fecfc49750d6dbcb794d7))
* **internal:** change ci workflow machines ([c723f1e](https://github.com/cloudflare/cloudflare-python/commit/c723f1eaa655a6564532058be0c2ebe64b85a87b))
* **internal:** codegen related update ([94440c3](https://github.com/cloudflare/cloudflare-python/commit/94440c34eb38c6e095017928012fd2efc03ec811))
* **internal:** detect breaking changes when removing endpoints ([cf3a21e](https://github.com/cloudflare/cloudflare-python/commit/cf3a21edb663b92b610352ea292f0ba0cb7d8bb5))
* **internal:** improve breaking change detection ([4bdc67a](https://github.com/cloudflare/cloudflare-python/commit/4bdc67a69bc45effb37a7acaa67f76f29a60a484))
* **internal:** minor formatting change ([b2f8765](https://github.com/cloudflare/cloudflare-python/commit/b2f8765441ba48c704b977bbd640db64a225cfd3))
* **internal:** move mypy configurations to `pyproject.toml` file ([4df020f](https://github.com/cloudflare/cloudflare-python/commit/4df020fe3462845f7023fd82d8c097215a7507dd))
* **internal:** update comment in script ([8f64f5f](https://github.com/cloudflare/cloudflare-python/commit/8f64f5f49b53a35b5d568ef7eb7e344acc463865))
* **internal:** update pyright exclude list ([abb1e1d](https://github.com/cloudflare/cloudflare-python/commit/abb1e1df0abd5af0c62a92235c06fc2e00ce1e34))
* **tests:** simplify `get_platform` test ([d35fa67](https://github.com/cloudflare/cloudflare-python/commit/d35fa67a081638cfaa8d41bc514d980e2a60babb))
* update @stainless-api/prism-cli to v5.15.0 ([a1e726e](https://github.com/cloudflare/cloudflare-python/commit/a1e726e0336c44efea0368dfaeb5aeb9a6965a02))
* update github action ([3a35ffd](https://github.com/cloudflare/cloudflare-python/commit/3a35ffddc79e5520fd5f77d0ae8b19509b8cfabb))

## 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