Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
96d72e3
Update bundle: workers
Jul 21, 2026
7245164
Update schema
Jul 22, 2026
20b9b72
chore: add changelog and bump version to 5.6.0
rotem-cloud Jul 22, 2026
4e822eb
feat: add API-Version header support
musa-cf Jul 31, 2026
0139d62
Merge branch 'feat/APIX-1328-api-version-header-gl' into 'main'
musa-cf Jul 31, 2026
279a277
Build SDK
rotem-cloud Aug 7, 2026
bf7dbdd
fix: move __api_version__ outside x-release-please region to avoid re…
rotem-cloud Aug 7, 2026
f935398
Build SDK
ssicard Aug 18, 2026
39bcd84
Build SDK
ssicard Aug 20, 2026
2799a31
Build SDK
ssicard Aug 21, 2026
ecdba20
chore: revert api_version custom code
ssicard Aug 21, 2026
5618be9
Update bundle: brapi
Aug 26, 2026
9020073
Update bundle: custom-pages
Aug 26, 2026
2010cd5
Merge branch 'chore/update-terraform-custom-code-tracking' into 'main'
vaishakdinesh Aug 27, 2026
b2785a3
Update schema
Aug 27, 2026
cfc6755
Merge branch 'chore/reseal-typescript-custom-code-tracking' into 'main'
vaishakdinesh Aug 28, 2026
b5d31c1
Merge branch 'chore/reseal-terraform-custom-code-tracking-r3' into 'm…
vaishakdinesh Aug 28, 2026
eb63ac1
Update staging bundle for brex
Sep 2, 2026
4886098
Merge branch 'custom-code-sync-ts' into 'main'
musa-cf Sep 3, 2026
e2fc5b0
Build SDK
musa-cf Sep 3, 2026
46a4421
Merge branch 'sync-codegen-py' into 'main'
musa-cf Sep 4, 2026
f5c73f8
docs(changelog): add v5.7.0 release notes
musa-cf Sep 4, 2026
b8d86a9
Merge branch 'chore/v5.7.0-changelog' into 'main'
musa-cf Sep 4, 2026
3edd446
chore: bump timeouts for CI
musa-cf Sep 4, 2026
d46f046
Merge branch 'ci-timeouts' into 'main'
musa-cf Sep 4, 2026
564362d
Build SDK
musa-cf Sep 4, 2026
ad9e772
chore: merge main and bump version to 5.7.0
musa-cf Sep 4, 2026
e57841d
fix: remove unused imports flagged by ruff
musa-cf Sep 4, 2026
7406a51
fix: resolve pyright errors in release 5.7.0
musa-cf Sep 4, 2026
a447213
fix: resolve remaining mypy duplicate-key errors and add missing crea…
musa-cf Sep 4, 2026
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
59 changes: 59 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
stages:
- lint
- build
- test
- review

include:
- component: $CI_SERVER_FQDN/cloudflare/ci/ai/opencode@~latest
inputs:
runOnMR: true

default:
image: $IMAGE_PYTHON

workflow:
rules:
- if: $CI_COMMIT_BRANCH !~ /^(integrated\/|stl-preview-head\/|stl-preview-base\/|generated|codegen\/)/
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH =~ /^codegen\/stl\//

lint:
stage: lint
timeout: 20 minutes
rules:
- if: $CI_COMMIT_TITLE == "codegen metadata"
when: never
- if: $CI_PIPELINE_SOURCE == "push"
- if: $CI_MERGE_REQUEST_SOURCE_PROJECT_PATH != $CI_PROJECT_PATH
script:
- uv sync --all-extras
- ./scripts/lint

build:
stage: build
timeout: 20 minutes
rules:
- if: $CI_COMMIT_TITLE == "codegen metadata"
when: never
- if: $CI_PIPELINE_SOURCE == "push"
- if: $CI_MERGE_REQUEST_SOURCE_PROJECT_PATH != $CI_PROJECT_PATH
script:
- uv sync --all-extras
- uv build

test:
stage: test
image: $IMAGE_NODE_TRIXIE
timeout: 20 minutes
allow_failure: true
rules:
- if: $CI_COMMIT_TITLE == "codegen metadata"
when: never
- if: $CI_PIPELINE_SOURCE == "push"
- if: $CI_MERGE_REQUEST_SOURCE_PROJECT_PATH != $CI_PROJECT_PATH
script:
- curl -LsSf https://astral.sh/uv/install.sh | sh
- export PATH="$HOME/.local/bin:$PATH"
- uv sync --all-extras
- ./scripts/test -n auto
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "5.6.0"
".": "5.7.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
configured_endpoints: 2521
configured_endpoints: 2600
154 changes: 154 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,159 @@
# Changelog

## 5.7.0 (2026-09-03)

Full Changelog: [v5.6.0...v5.7.0](https://github.com/cloudflare/cloudflare-python/compare/v5.6.0...v5.7.0)

### Breaking Changes

* **realtime_kit:** The `create_independent_livestream()` method has been removed from `client.realtime_kit.livestreams`. The `LivestreamCreateIndependentLivestreamParams` and `LivestreamCreateIndependentLivestreamResponse` types are no longer available.
* **intel:** The deprecated `dismiss()` method has been removed from `client.intel.attack_surface_report.issues`. The `IssueDismissResponse` and `IssueDismissParams` types are no longer available.
* **page_shield:** The `Setting` type has been removed from `cloudflare.types.page_shield`. The `get()` method now returns `Optional[PageShieldGetResponse]` and the `update()` method returns `PageShieldUpdateResponse`. The `Connection` type has been replaced by `ConnectionGetResponse` and `ConnectionListResponse`. The `Script` type has been replaced by `ScriptListResponse`. The `Policy` type has been replaced by per-method response types.
* **schema_validation:** The `schemas.delete()` method return type changed from `SchemaDeleteResponse` to `object`. The `SchemaDeleteResponse` type has been removed from `cloudflare.types.schema_validation`.
* **magic_transit:** The `HealthCheckParam` type has been removed from `cloudflare.types.magic_transit`. The `IPSECTunnelPSKGenerateParams` type has been removed from `cloudflare.types.magic_transit`.

### Features

* **email_security:** add `client.email_security.settings.content_policies` resource with `create()`, `list()`, `delete()`, `batch()`, `edit()`, and `get()` methods
* **email_sending:** add `client.email_sending.suppressions` resource with `create()`, `list()`, `delete()`, `edit()`, `get()`, and `import_()` methods; add `edit()` to `client.email_sending.subdomains`
* **logpush:** add `client.logpush.transformers` resource with `create()`, `update()`, `list()`, `delete()`, `get()`, and `preview()` methods; add `client.logpush.transformers.content` and `client.logpush.transformers.versions` sub-resources
* **spectrum:** add `client.spectrum.protocols` resource with `list()` method
* **zones:** add `client.zones.nel` resource with `edit()` and `get()` methods
* **ssl:** add `client.ssl.recommendations` resource with `get()` method
* **user:** add `client.user.spectrum_analytics.zones.reports` resource with `get()` method
* **browser_rendering:** add `client.browser_rendering.devtools.browser.live_view` resource with `create()` method
* **precursor:** add top-level `client.precursor` resource with `update()` and `get()` methods
* **email_security:** add `batch()` to `client.email_security.settings.allow_policies`, `client.email_security.settings.block_senders`, and `client.email_security.settings.trusted_domains`; add `create()`, `update()`, and `batch()` to `client.email_security.settings.domains`
* **addressing:** add `delete()` to `client.addressing.prefixes.bgp_prefixes`
* **r2_data_catalog:** add `delete()` to `client.r2_data_catalog`
* **zero_trust:** add `create()`, `update()`, and `delete()` to `client.zero_trust.resource_library.applications`
* **realtime_kit:** add `replace_preset_by_id()` to `client.realtime_kit.presets`
* **content_scanning:** add `update()` to `client.content_scanning.payloads`
* **token_validation:** add `edit()` to `client.token_validation.configuration.credentials`

#### New Resources

**Logpush Transformers** (`client.logpush.transformers`)

- `create(*, account_id, **params) -> Optional[TransformerCreateResponse]`
- `update(transformer_id, *, account_id, **params) -> Optional[TransformerUpdateResponse]`
- `list(*, account_id) -> SyncSinglePage[TransformerListResponse]`
- `delete(transformer_id, *, account_id) -> Optional[TransformerDeleteResponse]`
- `get(transformer_id, *, account_id) -> Optional[TransformerGetResponse]`
- `preview(*, account_id, **params) -> SyncSinglePage[TransformerPreviewResponse]`

New types:
```python
from cloudflare.types.logpush import (
TransformerCreateResponse,
TransformerUpdateResponse,
TransformerListResponse,
TransformerDeleteResponse,
TransformerGetResponse,
TransformerPreviewResponse,
)
```

**Logpush Transformer Content** (`client.logpush.transformers.content`)

- `get(transformer_id, *, account_id) -> ContentGetResponse`

**Logpush Transformer Versions** (`client.logpush.transformers.versions`)

- `list(transformer_id, *, account_id, **params) -> SyncSinglePage[VersionListResponse]`

**Email Security Content Policies** (`client.email_security.settings.content_policies`)

- `create(*, account_id, **params) -> Optional[ContentPolicyCreateResponse]`
- `list(*, account_id, **params) -> SyncV4PagePaginationArray[ContentPolicyListResponse]`
- `delete(policy_id, *, account_id) -> Optional[ContentPolicyDeleteResponse]`
- `batch(*, account_id, **params) -> Optional[ContentPolicyBatchResponse]`
- `edit(policy_id, *, account_id, **params) -> Optional[ContentPolicyEditResponse]`
- `get(policy_id, *, account_id) -> Optional[ContentPolicyGetResponse]`

New types:
```python
from cloudflare.types.email_security.settings import (
ContentPolicyCreateResponse,
ContentPolicyListResponse,
ContentPolicyDeleteResponse,
ContentPolicyBatchResponse,
ContentPolicyEditResponse,
ContentPolicyGetResponse,
)
```

**Email Sending Suppressions** (`client.email_sending.suppressions`)

- `create(*, account_id, **params) -> SuppressionCreateResponse`
- `list(*, account_id, **params) -> SyncCursorPagination[SuppressionListResponse]`
- `delete(suppression_id, *, account_id) -> SuppressionDeleteResponse`
- `edit(suppression_id, *, account_id, **params) -> SuppressionEditResponse`
- `get(suppression_id, *, account_id) -> SuppressionGetResponse`
- `import_(*, account_id, **params) -> SuppressionImportResponse`

New types:
```python
from cloudflare.types.email_sending import (
SuppressionCreateResponse,
SuppressionListResponse,
SuppressionDeleteResponse,
SuppressionEditResponse,
SuppressionGetResponse,
SuppressionImportResponse,
)
```

**Zones NEL** (`client.zones.nel`)

- `edit(*, zone_id, **params) -> Setting`
- `get(*, zone_id) -> Setting`

**Spectrum Protocols** (`client.spectrum.protocols`)

- `list(*, zone_id) -> SyncSinglePage[ProtocolListResponse]`

New types:
```python
from cloudflare.types.spectrum import ProtocolListResponse
```

**SSL Recommendations** (`client.ssl.recommendations`)

- `get(*, zone_id) -> RecommendationGetResponse`

New types:
```python
from cloudflare.types.ssl import RecommendationGetResponse
```

**User Spectrum Analytics Zone Reports** (`client.user.spectrum_analytics.zones.reports`)

- `get(*, **params) -> ReportGetResponse`

New types:
```python
from cloudflare.types.user.spectrum_analytics.zones import ReportGetResponse
```

**Browser Rendering Live View** (`client.browser_rendering.devtools.browser.live_view`)

- `create(browser_session_id, *, account_id, **params) -> LiveViewCreateResponse`

**Precursor** (`client.precursor`)

Top-level resource for precursor configuration management.

- `update(*, account_id, **params) -> Optional[PrecursorConfig]`
- `get(*, account_id) -> Optional[PrecursorConfig]`

New types:
```python
from cloudflare.types.precursor import PrecursorConfig
```

---

## 5.6.0 (2026-07-22)

Full Changelog: [v5.5.0...v5.6.0](https://github.com/cloudflare/cloudflare-python/compare/v5.5.0...v5.6.0)
Expand Down
2 changes: 2 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ Methods:

# [Fraud](src/cloudflare/resources/fraud/api.md)

# [Precursor](src/cloudflare/resources/precursor/api.md)

# [OriginPostQuantumEncryption](src/cloudflare/resources/origin_post_quantum_encryption/api.md)

# [OriginTLSComplianceModes](src/cloudflare/resources/origin_tls_compliance_modes/api.md)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "cloudflare"
version = "5.6.0"
version = "5.7.0"
description = "The official Python library for the cloudflare API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion scripts/lint
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ else
fi

echo "==> Running pyright"
uv run pyright
uv run pyright -p .

echo "==> Running mypy"
uv run mypy .
Expand Down
13 changes: 10 additions & 3 deletions scripts/mock

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ GREEN='\033[0;32m'
YELLOW='\033[0;33m'
NC='\033[0m' # No Color

MOCK_PORT="${STAINLESS_MOCK_PORT:-4010}"

function prism_is_running() {
curl --silent "http://localhost:4010" >/dev/null 2>&1
curl --silent "http://localhost:$MOCK_PORT" >/dev/null 2>&1
}

kill_server_on_port() {
Expand All @@ -27,7 +29,7 @@ function is_overriding_api_base_url() {

if ! is_overriding_api_base_url && ! prism_is_running ; then
# When we exit this script, make sure to kill the background mock server process
trap 'kill_server_on_port 4010' EXIT
trap 'kill_server_on_port "$MOCK_PORT"' EXIT

# Start the dev server
./scripts/mock --daemon
Expand All @@ -43,7 +45,7 @@ elif ! prism_is_running ; then
echo -e "To run the server, pass in the path or url of your OpenAPI"
echo -e "spec to the prism command:"
echo
echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}"
echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock -p $MOCK_PORT path/to/your.openapi.yml${NC}"
echo

exit 1
Expand All @@ -52,6 +54,10 @@ else
echo
fi

if [ -n "${STAINLESS_MOCK_PORT:-}" ] && ! is_overriding_api_base_url ; then
export TEST_API_BASE_URL="http://127.0.0.1:$MOCK_PORT"
fi

export DEFER_PYDANTIC_BUILD=false

# Note that we need to specify the patch version here so that uv
Expand Down
Loading
Loading