|
| 1 | +## 5.4.0 (2026-06-16) |
| 2 | + |
| 3 | +Full Changelog: [v5.3.0...v5.4.0](https://github.com/cloudflare/cloudflare-python/compare/v5.3.0...v5.4.0) |
| 4 | + |
| 5 | +### Features |
| 6 | + |
| 7 | +* **ai_gateway:** add `custom_providers` sub-resource ([b982ff3](https://github.com/cloudflare/cloudflare-python/commit/b982ff391eab267ef16c719d0fc798d970292ed2)) |
| 8 | +* **ct_alerter:** add CT alerting subscription endpoints (`client.zones.ct.alerting`) ([5bb529c](https://github.com/cloudflare/cloudflare-python/commit/5bb529c2eabe4ce0c23cddbf8073c6a025dc3024)) |
| 9 | +* **d1:** add `fields` parameter to `client.d1.database.get` ([2b0e738](https://github.com/cloudflare/cloudflare-python/commit/2b0e7388107c4110489484c2b38d4d9295b15af2)) |
| 10 | +* **flagship:** add `flagship` resource with apps, flags, changelog, and evaluate endpoints ([2b0e738](https://github.com/cloudflare/cloudflare-python/commit/2b0e7388107c4110489484c2b38d4d9295b15af2)) |
| 11 | +* **magic_transit:** add `cf1_sites` sub-resource with ramps, and `ipsec_tunnels.psk_set` method ([5d8e422](https://github.com/cloudflare/cloudflare-python/commit/5d8e422736d8e044d2c73065cbb8595573b2656d)) |
| 12 | +* **origin_tls_compliance_modes:** add `origin_tls_compliance_modes` resource ([2b0e738](https://github.com/cloudflare/cloudflare-python/commit/2b0e7388107c4110489484c2b38d4d9295b15af2)) |
| 13 | +* **ssl:** add `auto_origin_tls_kex` sub-resource ([2b0e738](https://github.com/cloudflare/cloudflare-python/commit/2b0e7388107c4110489484c2b38d4d9295b15af2)) |
| 14 | +* **tenants:** add `tenants` top-level resource and `user.tenants` sub-resource ([7677b4c](https://github.com/cloudflare/cloudflare-python/commit/7677b4c9566495b627b2cd90c9220268f9c6c46d)) |
| 15 | +* **zero_trust:** add DLP `sensitivity_groups`, `data_tag_categories`, and `data_classes` sub-resources ([2b0e738](https://github.com/cloudflare/cloudflare-python/commit/2b0e7388107c4110489484c2b38d4d9295b15af2)) |
| 16 | +* **zero_trust:** add `tunnels.warp_connector.configurations` sub-resource ([2b0e738](https://github.com/cloudflare/cloudflare-python/commit/2b0e7388107c4110489484c2b38d4d9295b15af2)) |
| 17 | + |
| 18 | + |
| 19 | +### Bug Fixes |
| 20 | + |
| 21 | +* **iam:** `OAuthScopeListResponse` type import path moved from `cloudflare.types.iam.oauth_scopes` to `cloudflare.types.iam` ([2b0e738](https://github.com/cloudflare/cloudflare-python/commit/2b0e7388107c4110489484c2b38d4d9295b15af2)) |
| 22 | + |
| 23 | + |
| 24 | +### Chores |
| 25 | + |
| 26 | +* **api:** update composite API spec ([2b0e738](https://github.com/cloudflare/cloudflare-python/commit/2b0e7388107c4110489484c2b38d4d9295b15af2)) |
| 27 | + |
| 28 | + |
| 29 | +### New Resources |
| 30 | + |
| 31 | +#### Tenants (`client.tenants`) |
| 32 | + |
| 33 | +- `get(tenant_id) -> Tenant` |
| 34 | +- `tenants.account_types.list(tenant_id) -> SyncSinglePage[AccountTypeListResponse]` |
| 35 | +- `tenants.accounts.list(tenant_id) -> SyncSinglePage[TenantAccount]` |
| 36 | +- `tenants.entitlements.get(tenant_id) -> TenantEntitlements` |
| 37 | +- `tenants.memberships.list(tenant_id) -> SyncSinglePage[TenantMembership]` |
| 38 | + |
| 39 | +New types: |
| 40 | +```python |
| 41 | +from cloudflare.types.tenants import ( |
| 42 | + Tenant, |
| 43 | + AccountTypeListResponse, |
| 44 | + TenantAccount, |
| 45 | + TenantEntitlements, |
| 46 | + TenantMembership, |
| 47 | +) |
| 48 | +``` |
| 49 | + |
| 50 | +#### Flagship (`client.flagship`) |
| 51 | + |
| 52 | +- `flagship.apps.create(*, account_id, **params) -> AppCreateResponse` |
| 53 | +- `flagship.apps.update(app_id, *, account_id, **params) -> AppUpdateResponse` |
| 54 | +- `flagship.apps.list(*, account_id) -> SyncSinglePage[AppListResponse]` |
| 55 | +- `flagship.apps.delete(app_id, *, account_id) -> AppDeleteResponse` |
| 56 | +- `flagship.apps.get(app_id, *, account_id) -> AppGetResponse` |
| 57 | +- `flagship.apps.flags.create(app_id, *, account_id, **params) -> FlagCreateResponse` |
| 58 | +- `flagship.apps.flags.update(flag_key, *, account_id, app_id, **params) -> FlagUpdateResponse` |
| 59 | +- `flagship.apps.flags.list(app_id, *, account_id, **params) -> SyncCursorPaginationAfter[FlagListResponse]` |
| 60 | +- `flagship.apps.flags.delete(flag_key, *, account_id, app_id) -> FlagDeleteResponse` |
| 61 | +- `flagship.apps.flags.get(flag_key, *, account_id, app_id) -> FlagGetResponse` |
| 62 | +- `flagship.apps.flags.changelog.list(flag_key, *, account_id, app_id, **params) -> SyncCursorPaginationAfter[ChangelogListResponse]` |
| 63 | +- `flagship.apps.evaluate.get(app_id, *, account_id, **params) -> EvaluateGetResponse` |
| 64 | + |
| 65 | +New types: |
| 66 | +```python |
| 67 | +from cloudflare.types.flagship import ( |
| 68 | + AppCreateResponse, |
| 69 | + AppUpdateResponse, |
| 70 | + AppListResponse, |
| 71 | + AppDeleteResponse, |
| 72 | + AppGetResponse, |
| 73 | +) |
| 74 | +from cloudflare.types.flagship.apps import ( |
| 75 | + FlagCreateResponse, |
| 76 | + FlagUpdateResponse, |
| 77 | + FlagListResponse, |
| 78 | + FlagDeleteResponse, |
| 79 | + FlagGetResponse, |
| 80 | + EvaluateGetResponse, |
| 81 | +) |
| 82 | +from cloudflare.types.flagship.apps.flags import ChangelogListResponse |
| 83 | +``` |
| 84 | + |
| 85 | +#### Origin TLS Compliance Modes (`client.origin_tls_compliance_modes`) |
| 86 | + |
| 87 | +- `update(*, zone_id, **params) -> Optional[OriginTLSComplianceModeUpdateResponse]` |
| 88 | +- `delete(*, zone_id) -> Optional[OriginTLSComplianceModeDeleteResponse]` |
| 89 | +- `edit(*, zone_id, **params) -> Optional[OriginTLSComplianceModeEditResponse]` |
| 90 | +- `get(*, zone_id) -> Optional[OriginTLSComplianceModeGetResponse]` |
| 91 | + |
| 92 | +New types: |
| 93 | +```python |
| 94 | +from cloudflare.types.origin_tls_compliance_modes import ( |
| 95 | + OriginTLSComplianceModeUpdateResponse, |
| 96 | + OriginTLSComplianceModeDeleteResponse, |
| 97 | + OriginTLSComplianceModeEditResponse, |
| 98 | + OriginTLSComplianceModeGetResponse, |
| 99 | +) |
| 100 | +``` |
| 101 | + |
| 102 | +### New Sub-Resources on Existing Resources |
| 103 | + |
| 104 | +#### AI Gateway - Custom Providers (`client.ai_gateway.custom_providers`) |
| 105 | + |
| 106 | +- `create(*, account_id, **params) -> CustomProviderCreateResponse` |
| 107 | +- `list(*, account_id, **params) -> SyncV4PagePaginationArray[CustomProviderListResponse]` |
| 108 | +- `delete(id, *, account_id) -> CustomProviderDeleteResponse` |
| 109 | +- `get(id, *, account_id) -> CustomProviderGetResponse` |
| 110 | + |
| 111 | +New types: |
| 112 | +```python |
| 113 | +from cloudflare.types.ai_gateway import ( |
| 114 | + CustomProviderCreateResponse, |
| 115 | + CustomProviderListResponse, |
| 116 | + CustomProviderDeleteResponse, |
| 117 | + CustomProviderGetResponse, |
| 118 | +) |
| 119 | +``` |
| 120 | + |
| 121 | +#### Magic Transit - CF1 Sites (`client.magic_transit.cf1_sites`) |
| 122 | + |
| 123 | +- `create(*, account_id, **params) -> SyncSinglePage[Cf1Site]` |
| 124 | +- `update(cf1_site_id, *, account_id, **params) -> Cf1Site` |
| 125 | +- `list(*, account_id) -> SyncSinglePage[Cf1Site]` |
| 126 | +- `delete(cf1_site_id, *, account_id) -> Cf1Site` |
| 127 | +- `get(cf1_site_id, *, account_id) -> Cf1Site` |
| 128 | +- `cf1_sites.ramps.create(cf1_site_id, *, account_id, **params) -> SyncSinglePage[Ramp]` |
| 129 | +- `cf1_sites.ramps.list(cf1_site_id, *, account_id) -> SyncSinglePage[Ramp]` |
| 130 | +- `cf1_sites.ramps.delete(ramp_id, *, account_id, cf1_site_id) -> Ramp` |
| 131 | +- `cf1_sites.ramps.get(ramp_id, *, account_id, cf1_site_id) -> Ramp` |
| 132 | + |
| 133 | +New types: |
| 134 | +```python |
| 135 | +from cloudflare.types.magic_transit import Cf1Site |
| 136 | +from cloudflare.types.magic_transit.cf1_sites import Ramp |
| 137 | +``` |
| 138 | + |
| 139 | +#### Magic Transit - IPsec Tunnels PSK Set (`client.magic_transit.ipsec_tunnels`) |
| 140 | + |
| 141 | +- `psk_set(*, account_id, **params) -> IPSECTunnelPSKSetResponse` |
| 142 | + |
| 143 | +New types: |
| 144 | +```python |
| 145 | +from cloudflare.types.magic_transit import IPSECTunnelPSKSetResponse |
| 146 | +``` |
| 147 | + |
| 148 | +#### SSL - Auto Origin TLS Kex (`client.ssl.auto_origin_tls_kex`) |
| 149 | + |
| 150 | +- `edit(*, zone_id, **params) -> AutoOriginTLSKexEditResponse` |
| 151 | +- `get(*, zone_id) -> AutoOriginTLSKexGetResponse` |
| 152 | + |
| 153 | +New types: |
| 154 | +```python |
| 155 | +from cloudflare.types.ssl import AutoOriginTLSKexEditResponse, AutoOriginTLSKexGetResponse |
| 156 | +``` |
| 157 | + |
| 158 | +#### Zones - CT Alerting (`client.zones.ct.alerting`) |
| 159 | + |
| 160 | +- `edit(*, zone_id, **params) -> Optional[AlertingEditResponse]` |
| 161 | +- `get(*, zone_id) -> Optional[AlertingGetResponse]` |
| 162 | + |
| 163 | +New types: |
| 164 | +```python |
| 165 | +from cloudflare.types.zones.ct import AlertingEditResponse, AlertingGetResponse |
| 166 | +``` |
| 167 | + |
| 168 | +#### User - Tenants (`client.user.tenants`) |
| 169 | + |
| 170 | +- `list() -> SyncSinglePage[Organization]` |
| 171 | + |
| 172 | +#### Zero Trust - DLP Sensitivity Groups (`client.zero_trust.dlp.sensitivity_groups`) |
| 173 | + |
| 174 | +- `create(*, account_id, **params) -> Optional[SensitivityGroupCreateResponse]` |
| 175 | +- `update(sensitivity_group_id, *, account_id, **params) -> Optional[SensitivityGroupUpdateResponse]` |
| 176 | +- `list(*, account_id) -> SyncSinglePage[SensitivityGroupListResponse]` |
| 177 | +- `delete(sensitivity_group_id, *, account_id) -> object` |
| 178 | +- `get(sensitivity_group_id, *, account_id) -> Optional[SensitivityGroupGetResponse]` |
| 179 | +- `sensitivity_groups.levels.create(...)` / `update(...)` / `list(...)` / `delete(...)` / `get(...)` |
| 180 | +- `sensitivity_groups.levels.order.update(...)` / `get(...)` |
| 181 | + |
| 182 | +#### Zero Trust - DLP Data Tag Categories (`client.zero_trust.dlp.data_tag_categories`) |
| 183 | + |
| 184 | +- `create(*, account_id, **params) -> Optional[DataTagCategoryCreateResponse]` |
| 185 | +- `update(category_id, *, account_id, **params) -> Optional[DataTagCategoryUpdateResponse]` |
| 186 | +- `list(*, account_id) -> SyncSinglePage[DataTagCategoryListResponse]` |
| 187 | +- `delete(category_id, *, account_id) -> object` |
| 188 | +- `get(category_id, *, account_id) -> Optional[DataTagCategoryGetResponse]` |
| 189 | +- `data_tag_categories.data_tags.create(...)` / `update(...)` / `list(...)` / `delete(...)` / `get(...)` |
| 190 | + |
| 191 | +#### Zero Trust - DLP Data Classes (`client.zero_trust.dlp.data_classes`) |
| 192 | + |
| 193 | +- `create(*, account_id, **params) -> Optional[DataClassCreateResponse]` |
| 194 | +- `update(data_class_id, *, account_id, **params) -> Optional[DataClassUpdateResponse]` |
| 195 | +- `list(*, account_id) -> SyncSinglePage[DataClassListResponse]` |
| 196 | +- `delete(data_class_id, *, account_id) -> object` |
| 197 | +- `get(data_class_id, *, account_id) -> Optional[DataClassGetResponse]` |
| 198 | + |
| 199 | +#### Zero Trust - WARP Connector Configurations (`client.zero_trust.tunnels.warp_connector.configurations`) |
| 200 | + |
| 201 | +- `update(tunnel_id, *, account_id, **params) -> Optional[ConfigurationUpdateResponse]` |
| 202 | +- `get(tunnel_id, *, account_id) -> Optional[ConfigurationGetResponse]` |
| 203 | + |
| 204 | +New types: |
| 205 | +```python |
| 206 | +from cloudflare.types.zero_trust.tunnels.warp_connector import ( |
| 207 | + ConfigurationUpdateResponse, |
| 208 | + ConfigurationGetResponse, |
| 209 | +) |
| 210 | +``` |
| 211 | + |
| 212 | +### Updated Methods |
| 213 | + |
| 214 | +#### D1 - Database Get |
| 215 | + |
| 216 | +`client.d1.database.get` now accepts an optional `fields` parameter to select which fields to include in the response. |
| 217 | + |
| 218 | +```python |
| 219 | +# Before (still works) |
| 220 | +db = client.d1.database.get(database_id, account_id="...") |
| 221 | + |
| 222 | +# New: select specific fields |
| 223 | +db = client.d1.database.get(database_id, account_id="...", fields=["name", "uuid", "file_size"]) |
| 224 | +``` |
| 225 | + |
| 226 | +#### IAM - OAuth Scopes |
| 227 | + |
| 228 | +`client.iam.oauth_scopes` module was flattened from a sub-package to a single module. The `OAuthScopeListResponse` type import path changed: |
| 229 | + |
| 230 | +```python |
| 231 | +# Before |
| 232 | +from cloudflare.types.iam.oauth_scopes import OAuthScopeListResponse |
| 233 | + |
| 234 | +# After |
| 235 | +from cloudflare.types.iam import OAuthScopeListResponse |
| 236 | +``` |
0 commit comments