Skip to content

Commit 0036f16

Browse files
authored
Merge branch 'main' into release-please--branches--main--changes--next
2 parents b96bd95 + 0b8edd4 commit 0036f16

3 files changed

Lines changed: 229 additions & 56 deletions

File tree

.github/workflows/semgrep.yml

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,31 @@
1+
name: Semgrep OSS scan
12
on:
3+
pull_request: {}
4+
push:
5+
branches: [main, master]
26
workflow_dispatch: {}
37
schedule:
4-
- cron: '0 4 * * *'
5-
name: Semgrep config
8+
- cron: '0 0 15 * *'
9+
concurrency:
10+
group: semgrep-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
11+
cancel-in-progress: true
12+
permissions:
13+
contents: read
614
jobs:
715
semgrep:
8-
name: semgrep/ci
9-
runs-on: ubuntu-latest
10-
env:
11-
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
12-
SEMGREP_URL: https://cloudflare.semgrep.dev
13-
SEMGREP_APP_URL: https://cloudflare.semgrep.dev
14-
SEMGREP_VERSION_CHECK_URL: https://cloudflare.semgrep.dev/api/check-version
15-
container:
16-
image: returntocorp/semgrep
16+
name: semgrep-oss
17+
runs-on: ubuntu-slim
18+
timeout-minutes: 25
1719
steps:
18-
- uses: actions/checkout@v4
19-
- run: semgrep ci
20+
- uses: actions/checkout@v5
21+
with:
22+
fetch-depth: 1
23+
- id: cache-semgrep
24+
uses: actions/cache@v5
25+
with:
26+
path: ~/.local
27+
key: semgrep-1.160.0-${{ runner.os }}
28+
- if: steps.cache-semgrep.outputs.cache-hit != 'true'
29+
run: pip install --user semgrep==1.160.0
30+
- run: echo "$HOME/.local/bin" >> "$GITHUB_PATH"
31+
- run: semgrep scan --config=auto

CHANGELOG.md

Lines changed: 161 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,61 +2,181 @@
22

33
## 5.1.0 (2026-05-06)
44

5-
Full Changelog: [v5.0.0-beta.2...v5.1.0](https://github.com/cloudflare/cloudflare-python/compare/v5.0.0-beta.2...v5.1.0)
5+
Full Changelog: [v5.0.0...v5.1.0](https://github.com/cloudflare/cloudflare-python/compare/v5.0.0...v5.1.0)
66

77
### Features
88

9-
* **api:** api update ([3b83baa](https://github.com/cloudflare/cloudflare-python/commit/3b83baa3be725513c98c33e678886f83f5c6b2ce))
10-
* chore: remove account_id and zone_id client options ([988df86](https://github.com/cloudflare/cloudflare-python/commit/988df8632b0b531c5b1117ecd7ed7d77925dd5ac))
11-
* feat: add organization audit logs endpoint ([6810580](https://github.com/cloudflare/cloudflare-python/commit/681058048aedeb0983d182b1168b131c332e1477))
12-
* feat(cache): Add origin cloud regions resource to docs/sdk for new API ([c7b5b51](https://github.com/cloudflare/cloudflare-python/commit/c7b5b51764e7c343140d91d4fd86cf7275eec271))
13-
* feat(iam): add user_groups and user_group_members terraform resources ([cb00d08](https://github.com/cloudflare/cloudflare-python/commit/cb00d08d86197bddbd55bd3107473c1e363c12c4))
14-
* **security_center:** update generated types and methods ([ed7d261](https://github.com/cloudflare/cloudflare-python/commit/ed7d261e696fd629101ec2c9197597287d12f479))
15-
* **zero_trust:** update generated types and methods ([7121a55](https://github.com/cloudflare/cloudflare-python/commit/7121a55d36569da5f7058a749952032c66687d67))
9+
* **security_center:** add `audit_logs`, `classification`, and `context` sub-resources to insights ([ed7d261](https://github.com/cloudflare/cloudflare-python/commit/ed7d261e6))
10+
* **zero_trust:** add `deployment_groups` sub-resource to devices ([7121a55](https://github.com/cloudflare/cloudflare-python/commit/7121a55d3))
11+
* **aisearch:** update generated types and methods ([54b87759](https://github.com/cloudflare/cloudflare-python/commit/54b87759b))
12+
* **email_security:** update generated types and methods ([23a979df](https://github.com/cloudflare/cloudflare-python/commit/23a979df2))
13+
* **radar:** update generated types and methods ([b48274ef](https://github.com/cloudflare/cloudflare-python/commit/b48274ef7))
14+
* **zones:** update generated types and methods ([f0a54099](https://github.com/cloudflare/cloudflare-python/commit/f0a540997))
1615

16+
#### Security Center - New Insights Sub-Resources
1717

18-
### Bug Fixes
18+
**AuditLogs** (`client.security_center.insights.audit_logs`)
19+
20+
- `list(*, account_id, zone_id, **params) -> SyncCursorPagination[AuditLogListResponse]`
21+
- `list_by_insight(issue_id, *, account_id, zone_id, **params) -> SyncCursorPagination[AuditLogListByInsightResponse]`
22+
23+
New types:
24+
```python
25+
from cloudflare.types.security_center.insights import (
26+
AuditLogListResponse,
27+
AuditLogListByInsightResponse,
28+
)
29+
```
30+
31+
**Classification** (`client.security_center.insights.classification`)
32+
33+
- `update(issue_id, *, account_id, zone_id, **params) -> ClassificationUpdateResponse`
34+
35+
New types:
36+
```python
37+
from cloudflare.types.security_center.insights import ClassificationUpdateResponse
38+
```
39+
40+
**Context** (`client.security_center.insights.context`)
41+
42+
- `get(issue_id, *, account_id) -> Optional[ContextGetResponse]`
43+
44+
New types:
45+
```python
46+
from cloudflare.types.security_center.insights import ContextGetResponse
47+
```
48+
49+
#### Zero Trust - Device Deployment Groups
50+
51+
New sub-resource `client.zero_trust.devices.deployment_groups`:
52+
53+
- `create(*, account_id, **params) -> DeploymentGroup`
54+
- `list(*, account_id, **params) -> SyncV4PagePaginationArray[DeploymentGroup]`
55+
- `delete(group_id, *, account_id) -> DeploymentGroupDeleteResponse`
56+
- `edit(group_id, *, account_id, **params) -> DeploymentGroup`
57+
- `get(group_id, *, account_id) -> DeploymentGroup`
58+
59+
New types:
60+
```python
61+
from cloudflare.types.zero_trust.devices import DeploymentGroup, DeploymentGroupDeleteResponse
62+
```
63+
64+
## 5.0.0 (2026-04-30)
65+
66+
Full Changelog: [v4.3.1...v5.0.0](https://github.com/cloudflare/cloudflare-python/compare/v4.3.1...v5.0.0)
67+
68+
This is a major release of the Cloudflare Python SDK. It drops support for
69+
Python 3.8, adds 11 new API services, introduces optional aiohttp backend
70+
support for improved async concurrency, and includes hundreds of type and
71+
method updates across the entire API surface.
72+
73+
Please review the breaking changes below before upgrading. A migration guide
74+
is available at [docs/migration-guides/v5.0.0-migration-guide.md](./docs/migration-guides/v5.0.0-migration-guide.md).
1975

20-
* **_models:** add polymorphic_serialization parameter to model_dump overrides ([342b5a8](https://github.com/cloudflare/cloudflare-python/commit/342b5a84daaf5c09e3e1612809d956d916a43621))
21-
* **ci:** pin single Python version to match pre-uv test behavior ([86676bc](https://github.com/cloudflare/cloudflare-python/commit/86676bca670d38d5947041bc5677138640dd6d92))
22-
* **ci:** run tests with single Python version and pydantic v2 only ([3259115](https://github.com/cloudflare/cloudflare-python/commit/3259115d9c1c5e2f116adda878851afc86ce5239))
23-
* **pipelines:** add BaseModel base to response SchemaFieldStruct/SchemaFieldList stubs ([d33af8b](https://github.com/cloudflare/cloudflare-python/commit/d33af8b5d5c1705fde4ae73efdbe3bfe3ba321df))
24-
* **radar:** move type: ignore[call-arg] to call site for mypy ([fac9404](https://github.com/cloudflare/cloudflare-python/commit/fac9404ebfa1eb5383a3d3c54f49e4120eb8cd11))
76+
---
77+
78+
#### Breaking Changes
79+
80+
- **Python 3.8 is no longer supported.** The minimum required version is now Python 3.9. ([pyproject.toml](https://github.com/cloudflare/cloudflare-python/compare/v4.3.1...v5.0.0))
81+
- **`typing-extensions` minimum version bumped** from `>=4.10` to `>=4.14`.
82+
83+
Additionally, the following resources have breaking changes:
84+
85+
- `abusereports`
86+
- `acm.totaltls`
87+
- `apigateway.configurations`
88+
- `cloudforceone.threatevents`
89+
- `d1.database`
90+
- `intel.indicatorfeeds`
91+
- `logpush.edge`
92+
- `origintlsclientauth.hostnames`
93+
- `queues.consumers`
94+
- `radar.bgp`
95+
- `rulesets.rules`
96+
- `schemavalidation.schemas`
97+
- `snippets`
98+
- `zerotrust.dlp`
99+
- `zerotrust.networks`
100+
101+
See the [v5.0.0 Migration Guide](./docs/migration-guides/v5.0.0-migration-guide.md) for upgrade instructions and resource-specific guidance.
102+
103+
---
104+
105+
#### Features
106+
107+
* **aiohttp backend support:** The async client now supports an optional `aiohttp` HTTP backend for improved concurrency performance. Install with `pip install cloudflare[aiohttp]` and use `DefaultAioHttpClient()` as the `http_client` parameter.
108+
* **Python 3.13 and 3.14 support** added as tested classifiers.
109+
110+
##### New Services
111+
112+
The following top-level resources are new in this release:
113+
114+
* **AISearch** (`aisearch`): AI-powered search capabilities
115+
* **Connectivity** (`connectivity`): Connectivity testing and diagnostics
116+
* **EmailSending** (`email_sending`): Email send and send_raw endpoints
117+
* **Fraud** (`fraud`): Fraud detection and prevention
118+
* **GoogleTagGateway** (`google_tag_gateway`): Google Tag Gateway management
119+
* **Organizations** (`organizations`): Organization audit logs and management
120+
* **R2DataCatalog** (`r2_data_catalog`): R2 Data Catalog operations
121+
* **RealtimeKit** (`realtime_kit`): Realtime communication (Calls/TURN)
122+
* **ResourceTagging** (`resource_tagging`): Resource tagging and labeling
123+
* **TokenValidation** (`token_validation`): Token validation configuration and rules
124+
* **VulnerabilityScanner** (`vulnerability_scanner`): Vulnerability scanning, credential sets, and target environments
125+
126+
##### New Endpoints on Existing Services
127+
128+
* **accounts:** update generated types and methods
129+
* **api_gateway:** add labels endpoints (WAM-1196)
130+
* **billing:** add billable usage PayGo endpoint
131+
* **brand_protection:** add v2 endpoints
132+
* **browser_rendering:** add devtools methods (BRAPI-1051)
133+
* **cache:** add origin cloud regions resource
134+
* **custom_origin_trust_store:** enable custom origin trust store
135+
* **dns:** add dns_records/usage endpoints (DNS-12466)
136+
* **email_security:** add phishguard reports endpoint
137+
* **iam:** add user_groups and user_group_members resources
138+
* **radar:** add Botnet Threat Feed and Post-Quantum endpoints
139+
* **workers:** add Observability Destinations resources (WO-989)
140+
* **zero_trust:** add Access Users endpoint (AUTH-7071), DEX rules, Device IP Profile, Device Subnet, WARP Connector connections and failover endpoints, WARP Subnet endpoints, Gateway PAC files (GIN-1439)
141+
* **zones:** add zone environments endpoints
142+
143+
##### Updated Services
144+
145+
Nearly every existing service received type and method updates through
146+
composite API spec refreshes. Notable updates include:
147+
148+
* **email_security:** remove deprecated type definitions
149+
* **radar:** restructured to use per-resource api.md sub-files (no client path changes)
150+
* **workers_for_platforms:** update generated types
151+
* **r2:** update generated types
152+
* **fraud:** update generated types and methods
153+
154+
155+
#### Bug Fixes
156+
157+
* **_models:** add `polymorphic_serialization` parameter to `model_dump` overrides ([342b5a8](https://github.com/cloudflare/cloudflare-python/commit/342b5a84daaf5c09e3e1612809d956d916a43621))
158+
* **pipelines:** add `BaseModel` base to response `SchemaFieldStruct`/`SchemaFieldList` stubs ([d33af8b](https://github.com/cloudflare/cloudflare-python/commit/d33af8b5d5c1705fde4ae73efdbe3bfe3ba321df))
159+
* **dlp:** add missing `model_rebuild`/`update_forward_refs` for `SharedEntryCustomEntry` classes ([25ec10c](https://github.com/cloudflare/cloudflare-python/commit/25ec10c814d138f8dea08a79f9984b70abb58477))
160+
* **workers:** make `RunQueryParametersNeedleValue` a `BaseModel` with `arbitrary_types_allowed` ([6b7efbc](https://github.com/cloudflare/cloudflare-python/commit/6b7efbc51e6189ba18225c57637015f050060683))
161+
* **stream:** remove duplicate `notification_url` field in webhook response types ([fc9fb2f](https://github.com/cloudflare/cloudflare-python/commit/fc9fb2f895c5de968f67c62bb599a6792be9fa8f))
25162
* resolve pre-existing codegen type errors ([fed88d6](https://github.com/cloudflare/cloudflare-python/commit/fed88d6c5a5e482a9de595a1431915320fa11d23))
163+
* **radar:** fix `type: ignore[call-arg]` placement for mypy compatibility ([fac9404](https://github.com/cloudflare/cloudflare-python/commit/fac9404ebfa1eb5383a3d3c54f49e4120eb8cd11))
164+
* fix broken reference for the queues `consumer` model ([3f5cf39](https://github.com/cloudflare/cloudflare-python/commit/3f5cf39405b6b38fc594ce348d93a6e7da92c276))
26165

27166

28-
### Chores
167+
#### Chores
29168

30-
* **accounts:** update generated types ([7ff4adf](https://github.com/cloudflare/cloudflare-python/commit/7ff4adf1cf53aae127ffcf059dbfd60620c661e5))
31-
* **aisearch:** update generated types and methods ([54b8775](https://github.com/cloudflare/cloudflare-python/commit/54b87759b6046cbd0e3330f3e32c80170fe9de61))
32-
* **aisearch:** update generated types and methods ([f22897e](https://github.com/cloudflare/cloudflare-python/commit/f22897e1ec7ac175278e5481c4855b44fe093a9d))
33-
* **aisearch:** update generated types, remove unused tests ([e20c138](https://github.com/cloudflare/cloudflare-python/commit/e20c1386bec9181c3dd6dae42a6dee58fc62f1fb))
34-
* **api:** update composite API spec ([511b508](https://github.com/cloudflare/cloudflare-python/commit/511b508a3dcdbce558c32bee20a2d2e2edefa689))
35-
* **api:** update composite API spec ([0ee5719](https://github.com/cloudflare/cloudflare-python/commit/0ee571927b0b9656256ed22d76a412b262241f44))
36-
* **api:** update composite API spec ([6bf05ea](https://github.com/cloudflare/cloudflare-python/commit/6bf05ea320bcbdf1d9fd30edc6d9a19a626a7d22))
37-
* **api:** update composite API spec ([fd0fca0](https://github.com/cloudflare/cloudflare-python/commit/fd0fca0667e9ca3837629d1aeb1ede7134f0253d))
38-
* **api:** update composite API spec ([67db9e9](https://github.com/cloudflare/cloudflare-python/commit/67db9e976b1f31e0a4526c76b8149390be128bd8))
39-
* **api:** update composite API spec ([0fd3baf](https://github.com/cloudflare/cloudflare-python/commit/0fd3baf76be724534d7693eb5a2c3da1b5144c57))
40-
* **api:** update composite API spec ([42c4dbf](https://github.com/cloudflare/cloudflare-python/commit/42c4dbfa49e879c59dd5e1100c9d5c0191c968d2))
41-
* **api:** upload stainless config from cloudflare-config ([0d64642](https://github.com/cloudflare/cloudflare-python/commit/0d646425898be57e654301e98c37beeb69d541c4))
42-
* apply shared infrastructure changes (rye -> uv migration) ([2f283c2](https://github.com/cloudflare/cloudflare-python/commit/2f283c29584b49e7c000f5e04aa5edc62db36ab9))
43-
* delete changelog draft ([f941e66](https://github.com/cloudflare/cloudflare-python/commit/f941e66bec7889ab45cd373be4209d7e9d5de64d))
44-
* **email_security:** remove deprecated type definitions ([878e3d4](https://github.com/cloudflare/cloudflare-python/commit/878e3d461cc5704a76665cb47e73b0f153f10546))
45-
* **email_security:** update generated types and methods ([23a979d](https://github.com/cloudflare/cloudflare-python/commit/23a979df28a8e2dedbf0ea83b7f6bfa69e48c61b))
46-
* **fraud:** update generated types and methods ([771c7e4](https://github.com/cloudflare/cloudflare-python/commit/771c7e45ce91554f4897bdc8cdea0ceedc2c48ab))
47-
* **internal:** version bump ([0a576fa](https://github.com/cloudflare/cloudflare-python/commit/0a576fa0cbe15e8ebee4ff4ca489d8362885231e))
48-
* **r2:** update generated types ([2e7856d](https://github.com/cloudflare/cloudflare-python/commit/2e7856d879a82674f6f141c6eef33576694cca0a))
49-
* **radar:** update generated types and methods ([b48274e](https://github.com/cloudflare/cloudflare-python/commit/b48274ef74a2ac8f58444cbbeb220ba1a425b5b9))
50-
* **radar:** update to_markdown type ignore comments ([d721964](https://github.com/cloudflare/cloudflare-python/commit/d721964e85978708190d31ba12a15b05f840c0b7))
51-
* sync shared codegen files from staging-next ([b8078b3](https://github.com/cloudflare/cloudflare-python/commit/b8078b3ac389f386263fb3d5c9d8c6a3b7db6be0))
52-
* sync shared codegen files from staging-next ([2802feb](https://github.com/cloudflare/cloudflare-python/commit/2802feb0090eb951a2393b7677b2601ed279d85f))
53-
* **workers_for_platforms:** update generated types ([f342310](https://github.com/cloudflare/cloudflare-python/commit/f3423103c48ad1308775105be71e2243ab1865ed))
54-
* **zones:** update generated types and methods ([f0a5409](https://github.com/cloudflare/cloudflare-python/commit/f0a540997c0a39a2a86227b71836542db258cc18))
169+
* **build:** migrate from rye to uv for project management ([2f283c2](https://github.com/cloudflare/cloudflare-python/commit/2f283c29584b49e7c000f5e04aa5edc62db36ab9))
170+
* **ci:** pin single Python version and pydantic v2 for test runs ([86676bc](https://github.com/cloudflare/cloudflare-python/commit/86676bca670d38d5947041bc5677138640dd6d92))
171+
* **typing:** add mypy configuration with strict mode ([pyproject.toml](https://github.com/cloudflare/cloudflare-python/compare/v4.3.1...v5.0.0))
172+
* **api:** 80+ composite API spec updates across the release cycle
55173

56174

57-
### Documentation
175+
#### Documentation
58176

59177
* add Authentication section to README ([70d934a](https://github.com/cloudflare/cloudflare-python/commit/70d934abd91cfa8f8444e0651ac97012c1d0edcf))
178+
* add aiohttp backend usage instructions to README
179+
* add MCP server integration badges (Cursor, VS Code)
60180

61181
## 5.0.0-beta.2 (2026-04-20)
62182

docs/v5-migration-guide.md renamed to docs/migration-guides/v5.0.0-migration-guide.md

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,50 @@ This guide helps you migrate your code from v4.3.1 to v5 of the Cloudflare Pytho
66

77
Version 5 introduces several breaking changes across multiple resources. This guide provides detailed migration instructions for each affected resource.
88

9-
**Important**: This is a beta release. APIs and types may change before the final v5.0.0 release.
9+
## Broad Breaking Changes
1010

11-
## Quick Reference
11+
### 1. Python 3.8 is no longer supported
12+
13+
**What changed:**
14+
The minimum required Python version is now 3.9. Python 3.8 reached end-of-life
15+
in October 2024.
16+
17+
**Impact:**
18+
If you are running Python 3.8, your application will fail to install or run
19+
with cloudflare v5.0.0.
20+
21+
**Actions Needed:**
22+
1. Upgrade to Python 3.9 or later (3.12+ recommended).
23+
2. Update any CI/CD pipelines or Docker images that pin Python 3.8.
24+
3. Review your `pyproject.toml` or `setup.py` for `python_requires` constraints.
25+
26+
**Before (v4.x):**
27+
```
28+
requires-python = ">= 3.8"
29+
```
30+
31+
**After (v5.0.0):**
32+
```
33+
requires-python = ">= 3.9"
34+
```
35+
36+
### 2. typing-extensions minimum version bumped
37+
38+
**What changed:**
39+
The minimum version of `typing-extensions` was raised from `>=4.10` to `>=4.14`.
40+
41+
**Impact:**
42+
If you pin `typing-extensions` to a version below 4.14, dependency resolution
43+
will fail.
44+
45+
**Actions Needed:**
46+
1. Update any version pins on `typing-extensions` to `>=4.14`.
47+
2. Run `pip install --upgrade typing-extensions` or let your dependency
48+
resolver handle it.
49+
50+
---
51+
52+
## Quick Reference for Resource Changes
1253

1354
Resources with breaking changes:
1455

0 commit comments

Comments
 (0)