Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: 4.0.0 #1195

Merged
merged 1,777 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1777 commits
Select commit Hold shift + click to select a range
bc2b5c4
feat(api): api update (#2160)
stainless-app[bot] Nov 15, 2024
441bcec
feat(api): api update (#2161)
stainless-app[bot] Nov 15, 2024
6f7623f
codegen metadata
stainless-bot Nov 15, 2024
5244425
feat(api): api update (#2162)
stainless-app[bot] Nov 15, 2024
c2770ee
feat(api): api update (#2163)
stainless-app[bot] Nov 15, 2024
3f20b98
feat(api): manual updates (#2164)
stainless-app[bot] Nov 18, 2024
2b267ce
codegen metadata
stainless-bot Nov 18, 2024
877e8c2
chore: rebuild project due to codegen change (#2165)
stainless-app[bot] Nov 18, 2024
9978385
codegen metadata
stainless-bot Nov 18, 2024
cd21ed6
codegen metadata
stainless-bot Nov 18, 2024
44c9de7
feat(api): api update (#2167)
stainless-app[bot] Nov 18, 2024
86eff89
feat(api): api update (#2168)
stainless-app[bot] Nov 18, 2024
94403aa
feat(api): api update (#2169)
stainless-app[bot] Nov 18, 2024
bfd27f8
feat(api): api update (#2170)
stainless-app[bot] Nov 19, 2024
f704605
feat(api): api update (#2171)
stainless-app[bot] Nov 19, 2024
08ad8b2
codegen metadata
stainless-bot Nov 19, 2024
5f7165b
codegen metadata
stainless-bot Nov 19, 2024
6cce632
codegen metadata
stainless-bot Nov 19, 2024
64c23aa
codegen metadata
stainless-bot Nov 19, 2024
abbdc97
feat(api): api update (#2172)
stainless-app[bot] Nov 19, 2024
9e7ca11
feat(api): api update (#2173)
stainless-app[bot] Nov 19, 2024
dbebda3
chore: rebuild project due to codegen change (#2174)
stainless-app[bot] Nov 19, 2024
d22a2de
feat(api): api update (#2175)
stainless-app[bot] Nov 19, 2024
c810755
chore(internal): codegen related update (#2176)
stainless-app[bot] Nov 20, 2024
3fd5de2
feat(api): introduce bulk operation methods (#2177)
stainless-app[bot] Nov 20, 2024
bd94126
feat(api): clean up missing models (#2178)
stainless-app[bot] Nov 20, 2024
d39c7b5
feat(api): api update (#2179)
stainless-app[bot] Nov 20, 2024
90be13d
feat(api): api update (#2180)
stainless-app[bot] Nov 20, 2024
f3c2bb4
feat(api): api update (#2181)
stainless-app[bot] Nov 20, 2024
660adfd
feat(api): update via SDK Studio (#2182)
stainless-app[bot] Nov 20, 2024
cda5a42
feat(api): update via SDK Studio (#2183)
stainless-app[bot] Nov 20, 2024
838f684
feat(api): update via SDK Studio (#2184)
stainless-app[bot] Nov 20, 2024
b461bd6
codegen metadata
stainless-bot Nov 20, 2024
efe358f
codegen metadata
stainless-bot Nov 20, 2024
073898d
codegen metadata
stainless-bot Nov 20, 2024
e727768
feat(api): update via SDK Studio (#2185)
stainless-app[bot] Nov 20, 2024
eeb6d8e
feat(zero_trust_organization): swap to upsert for creation (#2186)
stainless-app[bot] Nov 20, 2024
4e1d81a
feat(api): update via SDK Studio (#2187)
stainless-app[bot] Nov 20, 2024
d55a879
codegen metadata
stainless-bot Nov 20, 2024
09acf0a
feat(api): api update (#2188)
stainless-app[bot] Nov 20, 2024
93cfe28
feat(api): update via SDK Studio (#2189)
stainless-app[bot] Nov 20, 2024
4b59193
feat(api): update via SDK Studio (#2190)
stainless-app[bot] Nov 20, 2024
8fa356e
codegen metadata
stainless-bot Nov 20, 2024
b480965
feat(api): update via SDK Studio (#2191)
stainless-app[bot] Nov 20, 2024
f1b6c86
feat(api): update via SDK Studio (#2192)
stainless-app[bot] Nov 20, 2024
d4deaed
feat(api): update via SDK Studio (#2193)
stainless-app[bot] Nov 20, 2024
9949651
feat(api): update via SDK Studio (#2194)
stainless-app[bot] Nov 20, 2024
2de0fb0
feat(api): manual updates (#2195)
stainless-app[bot] Nov 20, 2024
8ed5f71
feat(r2_bucket): add `cors` support (#2196)
stainless-app[bot] Nov 21, 2024
8fb8e8b
feat(api): api update (#2197)
stainless-app[bot] Nov 21, 2024
1cad830
feat(api): api update (#2198)
stainless-app[bot] Nov 21, 2024
2d5cecb
feat(api): api update (#2199)
stainless-app[bot] Nov 21, 2024
5be5fe6
feat(api): api update (#2200)
stainless-app[bot] Nov 21, 2024
dc752c1
feat(api): api update (#2201)
stainless-app[bot] Nov 21, 2024
ace26df
feat(api): api update (#2202)
stainless-app[bot] Nov 21, 2024
1c97b11
feat(api): api update (#2203)
stainless-app[bot] Nov 21, 2024
f43f392
feat(zero_trust_device_certificates): update path placeholders (#2204)
stainless-app[bot] Nov 22, 2024
291389c
feat(api): api update (#2205)
stainless-app[bot] Nov 22, 2024
546cb1c
feat(api): api update (#2206)
stainless-app[bot] Nov 22, 2024
d40b099
feat(api): manual updates (#2207)
stainless-app[bot] Nov 22, 2024
1c448f1
codegen metadata
stainless-bot Nov 25, 2024
9218b3b
chore: remove now unused `cached-property` dep (#2208)
stainless-app[bot] Nov 25, 2024
2d037ba
codegen metadata
stainless-bot Nov 25, 2024
458a4a5
feat(api): api update (#2209)
stainless-app[bot] Nov 25, 2024
51a0005
feat(api): api update (#2211)
stainless-app[bot] Nov 26, 2024
eb4ca16
chore: workaround circular import error (#2210)
stainless-app[bot] Nov 26, 2024
4786ac7
codegen metadata
stainless-bot Nov 26, 2024
b6cc832
codegen metadata
stainless-bot Nov 26, 2024
19d7551
feat(api): api update (#2212)
stainless-app[bot] Nov 26, 2024
5bf1ef5
chore(internal): codegen related update (#2213)
stainless-app[bot] Nov 26, 2024
515e68c
chore(internal): codegen related update (#2214)
stainless-app[bot] Nov 26, 2024
ce08157
docs(api.md): fix return type annotations (#2215)
stainless-app[bot] Nov 26, 2024
272e71c
feat(api): api update (#2216)
stainless-app[bot] Nov 26, 2024
09de961
chore(internal): codegen related update (#2217)
stainless-app[bot] Nov 26, 2024
55b8cff
chore(internal): codegen related update (#2218)
stainless-app[bot] Nov 26, 2024
88819fc
feat(api): api update (#2219)
stainless-app[bot] Nov 26, 2024
de07ba2
feat(warp_connector)!: move under zero trust namespace (#2220)
stainless-app[bot] Nov 26, 2024
c984914
codegen metadata
stainless-bot Nov 26, 2024
5570f23
codegen metadata
stainless-bot Nov 26, 2024
aa8b4a6
codegen metadata
stainless-bot Nov 26, 2024
8eac90a
codegen metadata
stainless-bot Nov 27, 2024
5b79c50
codegen metadata
stainless-bot Nov 27, 2024
2c1492d
codegen metadata
stainless-bot Nov 27, 2024
0f01824
feat(api): api update (#2221)
stainless-app[bot] Nov 27, 2024
ee088e9
chore(internal): exclude mypy from running on tests (#2222)
stainless-app[bot] Nov 27, 2024
2e9734b
feat(api): api update (#2223)
stainless-app[bot] Nov 27, 2024
2cad4a0
feat(internal): update path placeholders (#2224)
stainless-app[bot] Nov 28, 2024
c04d762
feat(urlscanner): swap to v2 create (#2225)
stainless-app[bot] Nov 28, 2024
7065932
feat(api): manual updates (#2226)
stainless-app[bot] Nov 28, 2024
ace3716
feat(api): api update (#2227)
stainless-app[bot] Nov 28, 2024
a369813
fix(client): compat with new httpx 0.28.0 release (#2228)
stainless-app[bot] Nov 28, 2024
2b35234
feat(leaked_credential_check): add terraform resource (#2229)
stainless-app[bot] Nov 29, 2024
076177e
codegen metadata
stainless-bot Nov 29, 2024
1156419
chore(internal): codegen related update (#2230)
stainless-app[bot] Nov 29, 2024
3823729
feat(url_scanner)!: swap all methods to be v2 only (#2231)
stainless-app[bot] Dec 2, 2024
13247e7
codegen metadata
stainless-bot Dec 2, 2024
7d503e6
chore(internal): bump pyright (#2232)
stainless-app[bot] Dec 2, 2024
40cb3e1
feat(dnssec)!: move under DNS namespace (#2233)
stainless-app[bot] Dec 3, 2024
c3cd782
feat(zone_transfers)!: move under DNS namespace (#2234)
stainless-app[bot] Dec 3, 2024
34e5a29
feat(dns_firewall): break out into standalone package (#2235)
stainless-app[bot] Dec 3, 2024
a0f4c07
codegen metadata
stainless-bot Dec 3, 2024
adc6f6b
feat(api): api update (#2237)
stainless-app[bot] Dec 3, 2024
84bc37c
feat(api): api update (#2238)
stainless-app[bot] Dec 3, 2024
cb5fbad
feat: fix(project): constrain incompatible httpx and pydantic versions
RobertCraigie Dec 3, 2024
6a4602a
feat: release: 3.1.1
RobertCraigie Dec 3, 2024
4823b68
revert: fix(project): constrain incompatible httpx and pydantic versions
RobertCraigie Dec 3, 2024
375bc8c
feat(kv)!: move analytics under existing namespace (#2239)
Dec 4, 2024
a824f1b
chore(internal): fix formatting
RobertCraigie Dec 4, 2024
4b2bf34
chore: make the `Omit` type public (#2241)
stainless-app[bot] Dec 4, 2024
571fe0e
feat(dns): remove `delta` model (#2242)
stainless-app[bot] Dec 4, 2024
86ca907
feat(api): api update (#2243)
stainless-app[bot] Dec 4, 2024
0978d14
feat(api): api update (#2244)
stainless-app[bot] Dec 4, 2024
c12dfc0
feat(api): api update (#2245)
stainless-app[bot] Dec 5, 2024
e2f5e1b
feat(infrastructure_targets): add bulk endpoints (#2246)
stainless-app[bot] Dec 6, 2024
38a93e7
feat(api): api update (#2247)
stainless-app[bot] Dec 6, 2024
240f6c5
codegen metadata
stainless-app[bot] Dec 7, 2024
8b5316e
feat(dex): add commands support (#2248)
stainless-app[bot] Dec 9, 2024
5bd4192
test(api): disable some broken prism tests pending investigation (#2249)
stainless-app[bot] Dec 9, 2024
cb658ad
test: uncomment another round of broken prism tests (#2250)
stainless-app[bot] Dec 9, 2024
ff3807c
chore(internal): bump pydantic dependency (#2251)
stainless-app[bot] Dec 9, 2024
3f9fd35
docs(readme): fix http client proxies example (#2252)
stainless-app[bot] Dec 9, 2024
89e9982
chore(internal): codegen related update (#2253)
stainless-app[bot] Dec 9, 2024
39bd39c
feat(content_scanning): introduce support (#2254)
stainless-app[bot] Dec 9, 2024
f70b142
feat(api): manual updates (#2255)
stainless-app[bot] Dec 10, 2024
6b30a5b
codegen metadata
stainless-app[bot] Dec 10, 2024
f3206a6
codegen metadata
stainless-app[bot] Dec 10, 2024
db72d31
fix(urlscanner): fix invalid schema definition for plain text (#2256)
stainless-app[bot] Dec 10, 2024
9e6edc9
test: skip assertions with invalid auth failures (#2257)
stainless-app[bot] Dec 10, 2024
041b12d
test: skip assertions with invalid auth failures (#2258)
stainless-app[bot] Dec 10, 2024
7f6dfe2
test: skip assertions with invalid auth failures (#2259)
stainless-app[bot] Dec 10, 2024
d2f86b6
chore: updates (#2260)
stainless-app[bot] Dec 10, 2024
560801e
feat(dlp): disable problematic test (#2261)
stainless-app[bot] Dec 10, 2024
332f48d
chore: switch to TypeAliasType for request tracer
RobertCraigie Dec 10, 2024
c7dffd7
Merge remote-tracking branch 'origin/main' into next
RobertCraigie Dec 10, 2024
72b7def
feat(pagerules): rename namespace to page_rules (#2262)
stainless-app[bot] Dec 11, 2024
acbdc24
feat: generate more types that are used as request bodies (#2263)
stainless-app[bot] Dec 12, 2024
792e093
feat: swap DNS example to A
jacobbednarz Dec 12, 2024
ebd0a3a
feat: Delete examples/.keep
jacobbednarz Dec 12, 2024
72e5f89
chore(internal): bump pyright (#2264)
stainless-app[bot] Dec 12, 2024
f68f721
chore(internal): add support for TypeAliasType (#2265)
stainless-app[bot] Dec 12, 2024
da884ff
chore: use TypeAliasType for Pydantic v2 only
RobertCraigie Dec 12, 2024
e738082
feat(api): api update (#2266)
stainless-app[bot] Dec 12, 2024
165bc8c
feat(api): fix internal URL mappings (#2267)
stainless-app[bot] Dec 13, 2024
f21869f
feat(api): Add PATCH zone hold update method (#2268)
stainless-app[bot] Dec 13, 2024
90d0608
feat(ai)!: move to dedicated namespace (#2269)
stainless-app[bot] Dec 13, 2024
582142f
fix(internal): add cleaner handling of DNS unions (#2270)
stainless-app[bot] Dec 13, 2024
d723b37
fix(example): update example to reflect new structure
jacobbednarz Dec 13, 2024
f78a055
Merge pull request #2271 from cloudflare/update-examples
jacobbednarz Dec 13, 2024
c59b644
update example paths
jacobbednarz Dec 13, 2024
642d2d3
update dns example path
jacobbednarz Dec 13, 2024
9e517da
fix CLOUDFLARE_ZONE_ID value
jacobbednarz Dec 13, 2024
f3b2007
cleanup DNS record after the test
jacobbednarz Dec 13, 2024
0c5439a
Update record.py
jacobbednarz Dec 13, 2024
cf4cf84
codegen metadata
stainless-app[bot] Dec 13, 2024
2fe9a70
chore(internal): remove some duplicated imports (#2272)
stainless-app[bot] Dec 13, 2024
fcf96f7
feat(api): api update (#2273)
stainless-app[bot] Dec 13, 2024
352b69d
chore(internal): updated imports (#2274)
stainless-app[bot] Dec 13, 2024
5c57d32
feat(api): Update verb on PATCH zone hold method (#2275)
stainless-app[bot] Dec 13, 2024
d77a47e
feat(api): api update (#2276)
stainless-app[bot] Dec 13, 2024
674c2ce
feat(ai): move AI back to dedicated namespace (#2277)
stainless-app[bot] Dec 15, 2024
e5c69df
feat(dns): fix model oneOf (#2278)
stainless-app[bot] Dec 15, 2024
0991241
feat(workers): add routes support (#2279)
stainless-app[bot] Dec 16, 2024
54e1a34
docs(readme): example snippet for client context manager (#2280)
stainless-app[bot] Dec 16, 2024
712c994
chore(internal): codegen related update (#2282)
stainless-app[bot] Dec 16, 2024
6b98f7a
chore(internal): fix some typos (#2283)
stainless-app[bot] Dec 17, 2024
982f95a
feat(api): api update (#2284)
stainless-app[bot] Dec 17, 2024
b1b4b24
codegen metadata
stainless-app[bot] Dec 17, 2024
9cae1f0
feat(api): api update (#2285)
stainless-app[bot] Dec 17, 2024
efa8fcb
feat(api): api update (#2286)
stainless-app[bot] Dec 17, 2024
ce7f872
feat(api): map more endpoints (#2287)
stainless-app[bot] Dec 17, 2024
52ec839
feat(api): api update (#2288)
stainless-app[bot] Dec 17, 2024
9cb1e41
chore(internal): codegen related update (#2289)
stainless-app[bot] Dec 17, 2024
db76849
feat(api): api update (#2290)
stainless-app[bot] Dec 18, 2024
17a3ce1
feat(api): api update (#2291)
stainless-app[bot] Dec 18, 2024
5408013
feat(api): api update (#2292)
stainless-app[bot] Dec 18, 2024
f2cdcdc
feat(api): api update (#2293)
stainless-app[bot] Dec 18, 2024
17db44d
feat(api): api update (#2294)
stainless-app[bot] Dec 18, 2024
a3043d4
feat(api): manual updates (#2295)
stainless-app[bot] Dec 18, 2024
e7936f6
feat(api): api shield operations updates; rename discovery resource (…
stainless-app[bot] Dec 18, 2024
1230240
codegen metadata
stainless-app[bot] Dec 19, 2024
1d4bea4
feat(api): api update (#2297)
stainless-app[bot] Dec 19, 2024
124d934
codegen metadata
stainless-app[bot] Dec 19, 2024
5d21b01
codegen metadata
stainless-app[bot] Dec 19, 2024
5b6c236
codegen metadata
stainless-app[bot] Dec 19, 2024
2085a9e
feat(api): api update (#2298)
stainless-app[bot] Dec 19, 2024
429c4ee
feat(api): api update (#2299)
stainless-app[bot] Dec 29, 2024
73ec2ba
chore(internal): codegen related update (#2300)
stainless-app[bot] Jan 1, 2025
91253c2
feat(api): manual updates (#2301)
stainless-app[bot] Jan 1, 2025
df84d3a
feat(api): manual updates (#2302)
stainless-app[bot] Jan 1, 2025
b9a842b
feat(addressing)!: move service bindings to dedicated namespace (#2303)
stainless-app[bot] Jan 1, 2025
c10d3b7
feat(loa_documents)!: move download subresource into parent as `get` …
stainless-app[bot] Jan 1, 2025
4493d6c
feat(ai): add support for search endpoints and finetunes (#2305)
stainless-app[bot] Jan 2, 2025
8edd6d6
chore: small refactors (#2306)
stainless-app[bot] Jan 2, 2025
5dfdcbd
feat(r2)!: rename `cf-r2-jurisdiction` to more usable `jurisdiction` …
stainless-app[bot] Jan 3, 2025
fd63955
feat(r2)!: rename `cf-r2-jurisdiction` to more usable `jurisdiction` …
stainless-app[bot] Jan 3, 2025
a1ef1be
feat(r2)!: rename `cf-r2-jurisdiction` to more usable `jurisdiction` …
stainless-app[bot] Jan 3, 2025
20fbd7d
feat(zone_settings): update `origin_max_http_version` model (#2311)
stainless-app[bot] Jan 3, 2025
f7ca287
feat(api): manual updates (#2312)
stainless-app[bot] Jan 3, 2025
6c97352
feat(api): api update (#2313)
stainless-app[bot] Jan 4, 2025
8f97535
codegen metadata
stainless-app[bot] Jan 4, 2025
b04ba76
feat(cloud_connector): define body param name (#2314)
stainless-app[bot] Jan 6, 2025
a7aacf0
codegen metadata
stainless-app[bot] Jan 6, 2025
f411df9
codegen metadata
stainless-app[bot] Jan 6, 2025
09f456c
feat(api): api update (#2315)
stainless-app[bot] Jan 6, 2025
a271105
chore: add missing isclass check (#2316)
stainless-app[bot] Jan 6, 2025
c6cf3dc
feat(api): api update (#2317)
stainless-app[bot] Jan 6, 2025
9229d53
feat(api): api update (#2318)
stainless-app[bot] Jan 6, 2025
dce9437
feat(api): Add new Aegis zone setting (#2319)
stainless-app[bot] Jan 6, 2025
bdb21a5
feat(api): api update (#2320)
stainless-app[bot] Jan 6, 2025
f6b6e83
feat(origin_post_quantum_encryption): swap PUT for PATCH operation (#…
stainless-app[bot] Jan 6, 2025
e6a1bfa
feat(addressing)!: reshuffle relationship in the namespace to align w…
stainless-app[bot] Jan 7, 2025
cc90fdc
feat(api): skip authorization failures in prism (#2323)
stainless-app[bot] Jan 7, 2025
da91e21
feat(api): mark JSON as initialism (#2324)
stainless-app[bot] Jan 7, 2025
2a2e199
feat(api): manual updates (#2325)
stainless-app[bot] Jan 7, 2025
7e80cb8
feat(api): manual updates (#2326)
stainless-app[bot] Jan 7, 2025
ff79b8b
chore(internal): codegen related update (#2327)
stainless-app[bot] Jan 7, 2025
799c954
chore(internal): bump httpx dependency (#2328)
stainless-app[bot] Jan 7, 2025
10e2b12
fix(types): work around cyclical import error
RobertCraigie Jan 7, 2025
41a2158
fix(types): correct forward usage
RobertCraigie Jan 7, 2025
349d7af
fix(client): only call .close() when needed (#2330)
stainless-app[bot] Jan 7, 2025
0a952c0
feat(dlp): skip tests for `entries` update due to HTTP 422 in prism (…
stainless-app[bot] Jan 7, 2025
68720aa
test: skip more HTTP 422 failures from prism (#2332)
stainless-app[bot] Jan 7, 2025
6074a04
test: skip more HTTP 422 failures from prism (#2333)
stainless-app[bot] Jan 7, 2025
7af6c00
feat(examples): update paths to reflect namespace changes (#2334)
stainless-app[bot] Jan 8, 2025
5a0030a
docs: fix typos (#2336)
stainless-app[bot] Jan 8, 2025
e0e0068
chore(internal): codegen related update (#2337)
stainless-app[bot] Jan 8, 2025
645adba
feat(dns): add models for batch operations and response (#2339)
stainless-app[bot] Jan 8, 2025
e6ff06c
fix(api): better support union schemas with common properties (#2340)
stainless-app[bot] Jan 8, 2025
11683b6
feat(api): remove unneeded DNS transforms (#2341)
stainless-app[bot] Jan 8, 2025
2a3b8c5
feat(list_item): remove duplicated `anyOf` properties from component …
stainless-app[bot] Jan 9, 2025
1bd37b9
feat(api): api update (#2343)
stainless-app[bot] Jan 9, 2025
8072d1e
codegen metadata
stainless-app[bot] Jan 9, 2025
4423d8f
feat(api): api update (#2344)
stainless-app[bot] Jan 9, 2025
520a260
chore(examples): fix DNS record example
RobertCraigie Jan 9, 2025
9228d48
chore(internal): skip broken tests (#2345)
stainless-app[bot] Jan 9, 2025
7fce634
codegen metadata
stainless-app[bot] Jan 9, 2025
8225a83
feat(api): api update (#2347)
stainless-app[bot] Jan 9, 2025
1d668f9
codegen metadata
stainless-app[bot] Jan 9, 2025
61a852b
feat(api): update api shield operation endpoint (#2348)
stainless-app[bot] Jan 9, 2025
302b156
codegen metadata
stainless-app[bot] Jan 9, 2025
f3508f4
Merge pull request #2346 from cloudflare/robert/fix-example
jacobbednarz Jan 9, 2025
62ae025
codegen metadata
stainless-app[bot] Jan 9, 2025
878ae25
feat(api): manual updates (#2349)
stainless-app[bot] Jan 9, 2025
a1e865f
fix: correctly handle deserialising `cls` fields (#2350)
stainless-app[bot] Jan 9, 2025
85fd586
feat(api): manual updates (#2351)
stainless-app[bot] Jan 10, 2025
8ce1bcb
Update README.md
jacobbednarz Jan 10, 2025
b241f5b
chore: updates (#2352)
stainless-app[bot] Jan 11, 2025
7f83adf
chore: fix cyclical imports (#2353)
stainless-app[bot] Jan 13, 2025
1dedfa9
feat(api): api update (#2355)
stainless-app[bot] Jan 13, 2025
02d7cbb
release: 4.0.0
stainless-app[bot] Jan 13, 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
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ jobs:
- env:
CLOUDFLARE_ACCOUNT_ID: f037e56e89293a057740de681ac9abbe
CLOUDFLARE_EMAIL: [email protected]
CLOUDFLARE_ZONE_ID: 0da42c8d2132a9ddaf714f9e7c92011
CLOUDFLARE_ZONE_ID: 0da42c8d2132a9ddaf714f9e7c920711
CLOUDFLARE_API_KEY: ${{ secrets.CLOUDFLARE_API_KEY }}
run: |
rye run python ./examples/workers/ai/demo.py
rye run python ./examples/ai/demo.py
rye run python ./examples/dns/record.py
2 changes: 2 additions & 0 deletions .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Release Doctor

on:
pull_request:
branches:
- main
workflow_dispatch:

concurrency:
Expand Down
4 changes: 2 additions & 2 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "3.1.1"
}
".": "4.0.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1256
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-923d8c7667b68c786e6c026c4f4851798943c7d68ea055c0043d9253413c5847.yml
configured_endpoints: 1493
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3d78f855257b55bbb80884f99c3802cae877968d140eed3557fcb2cdd5f937b3.yml
264 changes: 264 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

52 changes: 28 additions & 24 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@

### With Rye

We use [Rye](https://rye.astral.sh/) to manage dependencies so we highly recommend [installing it](https://rye.astral.sh/guide/installation/) as it will automatically provision a Python environment with the expected Python version.
We use [Rye](https://rye.astral.sh/) to manage dependencies because it will automatically provision a Python environment with the expected Python version. To set it up, run:

After installing Rye, you'll just have to run this command:
```sh
$ ./scripts/bootstrap
```

Or [install Rye manually](https://rye.astral.sh/guide/installation/) and run:

```sh
$ rye sync --all-features
Expand All @@ -31,25 +35,25 @@ $ pip install -r requirements-dev.lock

## Modifying/Adding code

Most of the SDK is generated code, and any modified code will be overridden on the next generation. The
`src/cloudflare/lib/` and `examples/` directories are exceptions and will never be overridden.
Most of the SDK is generated code. Modifications to code will be persisted between generations, but may
result in merge conflicts between manual patches and changes from the generator. The generator will never
modify the contents of the `src/cloudflare/lib/` and `examples/` directories.

## Adding and running examples

All files in the `examples/` directory are not modified by the Stainless generator and can be freely edited or
added to.
All files in the `examples/` directory are not modified by the generator and can be freely edited or added to.

```bash
```py
# add an example to examples/<your-example>.py

#!/usr/bin/env -S rye run python
```

```
chmod +x examples/<your-example>.py
```sh
$ chmod +x examples/<your-example>.py
# run the example against your api
./examples/<your-example>.py
$ ./examples/<your-example>.py
```

## Using the repository from source
Expand All @@ -58,8 +62,8 @@ If you’d like to use the repository from source, you can either install from g

To install via git:

```bash
pip install git+ssh://[email protected]/cloudflare/cloudflare-python.git
```sh
$ pip install git+ssh://[email protected]/cloudflare/cloudflare-python.git
```

Alternatively, you can build from source and install the wheel file:
Expand All @@ -68,29 +72,29 @@ Building this package will create two files in the `dist/` directory, a `.tar.gz

To create a distributable version of the library, all you have to do is run this command:

```bash
rye build
```sh
$ rye build
# or
python -m build
$ python -m build
```

Then to install:

```sh
pip install ./path-to-wheel-file.whl
$ pip install ./path-to-wheel-file.whl
```

## Running tests

Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.

```bash
```sh
# you will need npm installed
npx prism mock path/to/your/openapi.yml
$ npx prism mock path/to/your/openapi.yml
```

```bash
rye run pytest
```sh
$ ./scripts/test
```

## Linting and formatting
Expand All @@ -100,14 +104,14 @@ This repository uses [ruff](https://github.com/astral-sh/ruff) and

To lint:

```bash
rye run lint
```sh
$ ./scripts/lint
```

To format and fix all ruff issues automatically:

```bash
rye run format
```sh
$ ./scripts/format
```

## Publishing and releases
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2024 Cloudflare
Copyright 2025 Cloudflare

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
75 changes: 50 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![PyPI version](https://img.shields.io/pypi/v/cloudflare.svg)](https://pypi.org/project/cloudflare/)

The Cloudflare Python library provides convenient access to the Cloudflare REST API from any Python 3.7+
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,
and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).

Expand All @@ -26,10 +26,8 @@ import os
from cloudflare import Cloudflare

client = Cloudflare(
# This is the default and can be omitted
api_email=os.environ.get("CLOUDFLARE_EMAIL"),
# This is the default and can be omitted
api_key=os.environ.get("CLOUDFLARE_API_KEY"),
api_email=os.environ.get("CLOUDFLARE_EMAIL"), # This is the default and can be omitted
api_key=os.environ.get("CLOUDFLARE_API_KEY"), # This is the default and can be omitted
)

zone = client.zones.create(
Expand All @@ -55,10 +53,8 @@ import asyncio
from cloudflare import AsyncCloudflare

client = AsyncCloudflare(
# This is the default and can be omitted
api_email=os.environ.get("CLOUDFLARE_EMAIL"),
# This is the default and can be omitted
api_key=os.environ.get("CLOUDFLARE_API_KEY"),
api_email=os.environ.get("CLOUDFLARE_EMAIL"), # This is the default and can be omitted
api_key=os.environ.get("CLOUDFLARE_API_KEY"), # This is the default and can be omitted
)


Expand Down Expand Up @@ -92,7 +88,7 @@ List methods in the Cloudflare API are paginated.
This library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:

```python
import cloudflare
from cloudflare import Cloudflare

client = Cloudflare()

Expand All @@ -108,7 +104,7 @@ Or, asynchronously:

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

client = AsyncCloudflare()

Expand Down Expand Up @@ -141,7 +137,7 @@ Or just work directly with the returned data:
```python
first_page = await client.accounts.list()
for account in first_page.result:
print(account)
print(account.id)

# Remove `await` for non-async usage.
```
Expand Down Expand Up @@ -176,7 +172,7 @@ except cloudflare.APIStatusError as e:
print(e.response)
```

Error codes are as followed:
Error codes are as follows:

| Status Code | Error Type |
| ----------- | -------------------------- |
Expand Down Expand Up @@ -247,12 +243,14 @@ Note that requests that time out are [retried twice by default](#retries).

We use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.

You can enable logging by setting the environment variable `CLOUDFLARE_LOG` to `debug`.
You can enable logging by setting the environment variable `CLOUDFLARE_LOG` to `info`.

```shell
$ export CLOUDFLARE_LOG=debug
$ export CLOUDFLARE_LOG=info
```

Or to `debug` for more verbose logging.

### How to tell whether `None` means `null` or missing

In an API response, a field may be explicitly `null`, or missing entirely; in either case, its value is `None` in this library. You can differentiate the two cases with `.model_fields_set`:
Expand Down Expand Up @@ -319,8 +317,7 @@ If you need to access undocumented endpoints, params, or response properties, th
#### Undocumented endpoints

To make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other
http verbs. Options on the client will be respected (such as retries) will be respected when making this
request.
http verbs. Options on the client will be respected (such as retries) when making this request.

```py
import httpx
Expand Down Expand Up @@ -349,39 +346,67 @@ can also get all the extra fields on the Pydantic model as a dict with

You can directly override the [httpx client](https://www.python-httpx.org/api/#client) to customize it for your use case, including:

- Support for proxies
- Custom transports
- Support for [proxies](https://www.python-httpx.org/advanced/proxies/)
- Custom [transports](https://www.python-httpx.org/advanced/transports/)
- Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality

```python
import httpx
from cloudflare import Cloudflare, DefaultHttpxClient

client = Cloudflare(
# Or use the `CLOUDFLARE_BASE_URL` env var
base_url="http://my.test.server.example.com:8083",
http_client=DefaultHttpxClient(
proxies="http://my.test.proxy.example.com",
proxy="http://my.test.proxy.example.com",
transport=httpx.HTTPTransport(local_address="0.0.0.0"),
),
)
```

You can also customize the client on a per-request basis by using `with_options()`:

```python
client.with_options(http_client=DefaultHttpxClient(...))
```

### Managing HTTP resources

By default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.

```py
from cloudflare import Cloudflare

with Cloudflare() as client:
# make requests here
...

# HTTP client is now closed
```

## Semantic versioning

This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:

1. Changes that only affect static types, without breaking runtime behavior.
1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals)_.
1. Changes to library internals which are technically public but not intended or documented for external use.
1. Changes that we do not expect to impact the vast majority of users in practice.

> [!WARNING]
> In addition to the above, changes to type names, structure or methods _may_ occur as we stabilise the automated codegen pipeline. This will be removed in the future once we are further along and the service owner OpenAPI schemas have reached a higher maturity level where changes are not as constant.
> If this isn't suitable for your project, we recommend pinning to a known version or using the previous major version.
### Determining the installed version

If you've upgraded to the latest version but aren't seeing any new features you were expecting then your python environment is likely still using an older version.

You can determine the version that is being used at runtime with:

```py
import cloudflare
print(cloudflare.__version__)
```

## Requirements

Python 3.7 or higher.
Python 3.8 or higher.

## Contributing

See [the contributing documentation](./CONTRIBUTING.md).
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Reporting Security Vulnerabilities

Please see [this page](https://www.cloudflare.com/.well-known/security.txt) for information on how to report a vulnerability to Cloudflare. Thanks!
Please see [this page](https://www.cloudflare.com/.well-known/security.txt) for information on how to report a vulnerability to Cloudflare. Thanks!
Loading
Loading