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

Open
wants to merge 1,588 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1588 commits
Select commit Hold shift + click to select a range
b3f5470
feat(api): api update (#2058)
stainless-app[bot] Oct 24, 2024
f73219b
codegen metadata
stainless-bot Oct 24, 2024
dad85a1
codegen metadata
stainless-bot Oct 24, 2024
1653edd
codegen metadata
stainless-bot Oct 24, 2024
9ce46d9
feat(api): api update (#2059)
stainless-app[bot] Oct 24, 2024
587dc9a
feat(api): api update (#2060)
Oct 24, 2024
cd52692
feat(api): api update (#2062)
Oct 24, 2024
0d56519
codegen metadata
Oct 27, 2024
fd48f20
codegen metadata
Oct 28, 2024
6747b4d
codegen metadata
Oct 28, 2024
95dcd89
codegen metadata
stainless-bot Oct 25, 2024
377fde0
codegen metadata
stainless-bot Oct 25, 2024
5bf3a70
codegen metadata
stainless-bot Oct 25, 2024
be92858
feat(api): api update (#2065)
stainless-app[bot] Oct 25, 2024
e6cd2b2
feat(api): api update (#2066)
stainless-app[bot] Oct 25, 2024
a0e6c34
feat(api): api update (#2067)
stainless-app[bot] Oct 25, 2024
55fdf43
codegen metadata
stainless-bot Oct 25, 2024
b0faa58
feat(api): api update (#2068)
stainless-app[bot] Oct 25, 2024
f21ae8a
feat(api): api update (#2069)
stainless-app[bot] Oct 25, 2024
dc06ed7
feat(api): api update (#2070)
stainless-app[bot] Oct 25, 2024
5d3f801
codegen metadata
stainless-bot Oct 25, 2024
5f3ac2d
codegen metadata
stainless-bot Oct 25, 2024
0927888
codegen metadata
stainless-bot Oct 25, 2024
0276070
feat(api): api update (#2071)
stainless-app[bot] Oct 25, 2024
6c589c8
feat(api): api update (#2072)
stainless-app[bot] Oct 25, 2024
0ad5c7e
codegen metadata
stainless-bot Oct 25, 2024
5bdf8d5
codegen metadata
stainless-bot Oct 25, 2024
5836b62
feat(api): api update (#2073)
stainless-app[bot] Oct 25, 2024
84d7c24
feat(api): api update (#2074)
stainless-app[bot] Oct 25, 2024
0663f4a
codegen metadata
stainless-bot Oct 25, 2024
7d12c58
feat(api): api update (#2075)
stainless-app[bot] Oct 25, 2024
516a7dc
feat(api): api update (#2076)
stainless-app[bot] Oct 26, 2024
122fb95
feat(api): api update (#2077)
stainless-app[bot] Oct 26, 2024
0192a71
feat(snippet_rules): add `delete` support (#2080)
stainless-app[bot] Oct 28, 2024
f573cb2
feat(api): api update (#2081)
stainless-app[bot] Oct 28, 2024
3948b37
feat(hyperdrive_config): remove overriding `id` mappings (#2082)
stainless-app[bot] Oct 28, 2024
360515b
feat(api): api update (#2083)
stainless-app[bot] Oct 28, 2024
eafbc75
codegen metadata
stainless-bot Oct 28, 2024
dac2d0c
feat(api): api update (#2084)
stainless-app[bot] Oct 28, 2024
839e93f
feat(api): api update (#2085)
stainless-app[bot] Oct 28, 2024
1cf36f9
feat(api): api update (#2086)
stainless-app[bot] Oct 28, 2024
45b1f6c
feat(api): api update (#2087)
stainless-app[bot] Oct 28, 2024
78f97fc
feat(api): api update (#2088)
stainless-app[bot] Oct 28, 2024
3013e82
feat(api): api update (#2089)
stainless-app[bot] Oct 28, 2024
b0a850f
feat(api): api update (#2090)
stainless-app[bot] Oct 28, 2024
522ee54
feat(api): api update (#2091)
stainless-app[bot] Oct 28, 2024
f52a8d6
feat(api): api update (#2092)
stainless-app[bot] Oct 28, 2024
5f6b64e
feat(api): api update (#2093)
stainless-app[bot] Oct 28, 2024
82fa3ce
feat(api): api update (#2094)
Oct 28, 2024
7d79a27
feat(api): api update (#2096)
Oct 28, 2024
ecd3398
feat(api): api update (#2097)
Oct 28, 2024
adbc2a2
feat(api): api update (#2100)
stainless-app[bot] Oct 28, 2024
a42b541
feat(api): api update (#2101)
stainless-app[bot] Oct 28, 2024
fe6f102
codegen metadata
stainless-bot Oct 28, 2024
cc4dd91
feat(r2): add custom domain and managed domain resources (#2102)
stainless-app[bot] Oct 28, 2024
d88201e
codegen metadata
stainless-bot Oct 28, 2024
6b1c55c
codegen metadata
stainless-bot Oct 28, 2024
35b5c2e
codegen metadata
stainless-bot Oct 28, 2024
f6ccb89
feat(zone_cache_variants): fix schema reference for model (#2103)
stainless-app[bot] Oct 29, 2024
99fa058
codegen metadata
stainless-bot Oct 29, 2024
ddf63db
codegen metadata
stainless-bot Oct 29, 2024
9eef074
codegen metadata
stainless-bot Oct 29, 2024
e3cdcbc
codegen metadata
stainless-bot Oct 29, 2024
201c3d3
codegen metadata
stainless-bot Oct 29, 2024
600cf36
codegen metadata
stainless-bot Oct 29, 2024
525500a
codegen metadata
stainless-bot Oct 29, 2024
6bba17e
codegen metadata
stainless-bot Oct 29, 2024
ed67372
codegen metadata
stainless-bot Oct 29, 2024
71f9376
codegen metadata
stainless-bot Oct 29, 2024
028f812
codegen metadata
stainless-bot Oct 29, 2024
7884fa9
codegen metadata
stainless-bot Oct 29, 2024
38cabdb
codegen metadata
stainless-bot Oct 29, 2024
60108cf
codegen metadata
stainless-bot Oct 29, 2024
5224699
codegen metadata
stainless-bot Oct 29, 2024
2fdb36a
codegen metadata
stainless-bot Oct 29, 2024
c70c0aa
codegen metadata
stainless-bot Oct 29, 2024
f21bfd7
feat(api): add support for r2 bucket lifecycle and resource sharing (…
stainless-app[bot] Oct 29, 2024
ee7863d
codegen metadata
stainless-bot Oct 30, 2024
86d2ca9
codegen metadata
stainless-bot Oct 30, 2024
b7c068d
codegen metadata
stainless-bot Oct 30, 2024
e62687a
codegen metadata
stainless-bot Oct 30, 2024
ca3b4bb
codegen metadata
stainless-bot Oct 30, 2024
ae32a0c
codegen metadata
stainless-bot Oct 30, 2024
dc78f1f
codegen metadata
stainless-bot Oct 30, 2024
39d7950
codegen metadata
stainless-bot Oct 30, 2024
ae29434
codegen metadata
stainless-bot Oct 30, 2024
a420a8a
codegen metadata
stainless-bot Oct 30, 2024
bb57aa3
codegen metadata
stainless-bot Oct 30, 2024
4e9e194
codegen metadata
stainless-bot Oct 30, 2024
e20afff
codegen metadata
stainless-bot Oct 30, 2024
3ae61fa
codegen metadata
stainless-bot Oct 30, 2024
352211e
codegen metadata
stainless-bot Oct 30, 2024
2bc2dad
codegen metadata
stainless-bot Oct 30, 2024
0212953
feat(api): api update (#2105)
stainless-app[bot] Oct 30, 2024
acfefb7
codegen metadata
stainless-bot Oct 30, 2024
41cf644
codegen metadata
stainless-bot Oct 30, 2024
ce27740
feat(r2)!: move domains, event notifications and sippy under bucket n…
stainless-app[bot] Oct 30, 2024
132b928
codegen metadata
stainless-bot Oct 30, 2024
e834126
codegen metadata
stainless-bot Oct 30, 2024
7e4dc28
codegen metadata
stainless-bot Oct 31, 2024
c5015be
codegen metadata
stainless-bot Oct 31, 2024
b208526
codegen metadata
stainless-bot Oct 31, 2024
e93416a
codegen metadata
stainless-bot Oct 31, 2024
8d7e74c
codegen metadata
stainless-bot Oct 31, 2024
8f86af0
fix(api): certificate_pack create flow (#2107)
stainless-app[bot] Oct 31, 2024
86aa020
feat(api): api update (#2108)
stainless-app[bot] Nov 1, 2024
98cbcf0
codegen metadata
stainless-bot Nov 1, 2024
f0224d9
feat(api): api update (#2109)
stainless-app[bot] Nov 1, 2024
f205265
codegen metadata
stainless-bot Nov 1, 2024
1231213
codegen metadata
stainless-bot Nov 1, 2024
5425248
codegen metadata
stainless-bot Nov 1, 2024
784ac50
codegen metadata
stainless-bot Nov 1, 2024
cff7a71
codegen metadata
stainless-bot Nov 1, 2024
dba2577
codegen metadata
stainless-bot Nov 1, 2024
4c0208f
codegen metadata
stainless-bot Nov 1, 2024
2738b43
codegen metadata
stainless-bot Nov 1, 2024
97587ec
feat(api): make `pop` initialism (#2110)
stainless-app[bot] Nov 4, 2024
af11bd2
feat(api): remap models to newer bundle names (#2111)
stainless-app[bot] Nov 4, 2024
43e110c
feat(api): remap models to newer bundle names (#2112)
stainless-app[bot] Nov 4, 2024
c31276a
feat(api): api update (#2113)
stainless-app[bot] Nov 4, 2024
8481e89
feat(api): api update (#2114)
stainless-app[bot] Nov 4, 2024
9df3ed0
codegen metadata
stainless-bot Nov 4, 2024
a5741e3
codegen metadata
stainless-bot Nov 4, 2024
16c1ded
codegen metadata
stainless-bot Nov 4, 2024
5a0bbb5
feat(api): api update (#2115)
stainless-app[bot] Nov 4, 2024
2822b77
codegen metadata
stainless-bot Nov 4, 2024
a741bdf
codegen metadata
stainless-bot Nov 4, 2024
dc34f99
feat(api): api update (#2116)
stainless-app[bot] Nov 4, 2024
57550b4
feat(api): api update (#2117)
stainless-app[bot] Nov 4, 2024
68e3460
codegen metadata
stainless-bot Nov 4, 2024
c0fb56e
feat(api): api update (#2118)
stainless-app[bot] Nov 4, 2024
9240e69
feat(api): api update (#2119)
stainless-app[bot] Nov 4, 2024
7ed7289
feat(calls)!: split turn and sfu apps (#2120)
stainless-app[bot] Nov 4, 2024
4f8e681
codegen metadata
stainless-bot Nov 4, 2024
da7b5f4
codegen metadata
stainless-bot Nov 4, 2024
7e91d46
codegen metadata
stainless-bot Nov 4, 2024
827c100
codegen metadata
stainless-bot Nov 4, 2024
9ef8e45
feat(api): initialism for SFU (#2121)
stainless-app[bot] Nov 4, 2024
a099fad
codegen metadata
stainless-bot Nov 4, 2024
cb12f0c
feat(zero_trust_local_domain_fallback): define body param for updates…
stainless-app[bot] Nov 5, 2024
f52ebe6
feat(api): api update (#2123)
stainless-app[bot] Nov 5, 2024
cebdca0
codegen metadata
stainless-bot Nov 5, 2024
4bdc8b8
codegen metadata
stainless-bot Nov 5, 2024
f75e797
codegen metadata
stainless-bot Nov 5, 2024
4becac8
codegen metadata
stainless-bot Nov 5, 2024
a1f4015
codegen metadata
stainless-bot Nov 5, 2024
e03ce04
feat(api): api update (#2124)
stainless-app[bot] Nov 5, 2024
52a6813
codegen metadata
stainless-bot Nov 6, 2024
798b1a0
feat(api): api update (#2125)
stainless-app[bot] Nov 6, 2024
0d7e314
codegen metadata
stainless-bot Nov 6, 2024
fe787a3
feat(api): api update (#2126)
stainless-app[bot] Nov 6, 2024
eef643f
feat(api): api update (#2127)
stainless-app[bot] Nov 6, 2024
dae1150
feat(api): remap models for magic visibility (#2128)
stainless-app[bot] Nov 7, 2024
ff2f5dc
feat(api): api update (#2129)
stainless-app[bot] Nov 7, 2024
f57867d
feat(api): api update (#2130)
stainless-app[bot] Nov 7, 2024
e077e34
feat(api): api update (#2131)
stainless-app[bot] Nov 7, 2024
f0898d4
feat(api): api update (#2132)
stainless-app[bot] Nov 8, 2024
22d878b
feat(api): api update (#2133)
stainless-app[bot] Nov 8, 2024
6fd4293
codegen metadata
stainless-bot Nov 8, 2024
fdc0bb6
chore: rebuild project due to codegen change (#2134)
stainless-app[bot] Nov 11, 2024
29e0389
feat(api): api update (#2135)
stainless-app[bot] Nov 11, 2024
504c74e
codegen metadata
stainless-bot Nov 11, 2024
b132a0d
feat(api): api update (#2136)
stainless-app[bot] Nov 11, 2024
e323e62
feat(zero_trust_device): reshuffle structure to allow use of custom a…
stainless-app[bot] Nov 11, 2024
74f433a
feat(api): clean up missing model references (#2138)
stainless-app[bot] Nov 12, 2024
a88b77d
fix(waiting_room_rules): define `body_param_name` for bulk rules endp…
stainless-app[bot] Nov 12, 2024
385c772
feat(api): api update (#2140)
stainless-app[bot] Nov 12, 2024
1914be1
chore: rebuild project due to codegen change (#2141)
stainless-app[bot] Nov 12, 2024
24412bf
codegen metadata
stainless-bot Nov 12, 2024
68582c4
codegen metadata
stainless-bot Nov 12, 2024
d44d69e
codegen metadata
stainless-bot Nov 12, 2024
0b5a5d0
feat(api): api update (#2142)
stainless-app[bot] Nov 12, 2024
2f10d9c
feat(api): api update (#2143)
stainless-app[bot] Nov 13, 2024
f61777a
codegen metadata
stainless-bot Nov 13, 2024
6e79a67
feat(api): map in new endpoints for account owned tokens, dns setting…
stainless-app[bot] Nov 13, 2024
6473ee6
chore: rebuild project due to codegen change (#2145)
stainless-app[bot] Nov 14, 2024
c1e8143
feat(api): api update (#2146)
stainless-app[bot] Nov 14, 2024
abbd9f7
feat(api): api update (#2147)
stainless-app[bot] Nov 14, 2024
178ca7e
feat(api): api update (#2148)
stainless-app[bot] Nov 14, 2024
b6ca4bd
feat(api): api update (#2149)
stainless-app[bot] Nov 14, 2024
99d9133
feat(api): api update (#2150)
stainless-app[bot] Nov 14, 2024
0ac8d45
feat(api): api update (#2151)
stainless-app[bot] Nov 14, 2024
66d6d48
feat(fleet_status): update path placeholders to match conventions (#2…
stainless-app[bot] Nov 15, 2024
354f6d2
feat(iam): fix model mappings (#2154)
stainless-app[bot] Nov 15, 2024
503ab54
feat(api): clean up indirect models (#2155)
stainless-app[bot] Nov 15, 2024
9abf6d5
feat(python): expand `model_type` rename to paths as well (#2156)
stainless-app[bot] Nov 15, 2024
8c246c1
feat(tokens): move token value model to shared (#2157)
stainless-app[bot] Nov 15, 2024
f92d492
feat(tokens): move condition and policy to shared models (#2158)
stainless-app[bot] Nov 15, 2024
1629b7f
feat(api): api update (#2159)
stainless-app[bot] Nov 15, 2024
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
7e0fbe5
release: 4.0.0
stainless-app[bot] Nov 22, 2024
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
  •  
  •  
  •  
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
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "3.1.0"
".": "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: 1451
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a02ba2b0fe51558afee8cb212cbae6586f4ac2e7c20f46cbac6aeaf91a51f23e.yml
193 changes: 193 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
49 changes: 34 additions & 15 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 @@ -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 @@ -366,6 +364,12 @@ client = Cloudflare(
)
```

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.
Expand All @@ -382,6 +386,21 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con
> 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