File tree 3 files changed +13
-0
lines changed
3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ from cloudflare import Cloudflare
30
30
client = Cloudflare(
31
31
# This is the default and can be omitted
32
32
api_email = os.environ.get(" CLOUDFLARE_EMAIL" ),
33
+ # This is the default and can be omitted
34
+ api_key = os.environ.get(" CLOUDFLARE_API_KEY" ),
33
35
)
34
36
35
37
zone = client.zones.create(
@@ -57,6 +59,8 @@ from cloudflare import AsyncCloudflare
57
59
client = AsyncCloudflare(
58
60
# This is the default and can be omitted
59
61
api_email = os.environ.get(" CLOUDFLARE_EMAIL" ),
62
+ # This is the default and can be omitted
63
+ api_key = os.environ.get(" CLOUDFLARE_API_KEY" ),
60
64
)
61
65
62
66
Original file line number Diff line number Diff line change 6
6
is_list as is_list ,
7
7
is_given as is_given ,
8
8
is_tuple as is_tuple ,
9
+ lru_cache as lru_cache ,
9
10
is_mapping as is_mapping ,
10
11
is_tuple_t as is_tuple_t ,
11
12
parse_date as parse_date ,
Original file line number Diff line number Diff line change @@ -389,3 +389,11 @@ def get_async_library() -> str:
389
389
return sniffio .current_async_library ()
390
390
except Exception :
391
391
return "false"
392
+
393
+
394
+ def lru_cache (* , maxsize : int | None = 128 ) -> Callable [[CallableT ], CallableT ]:
395
+ """A version of functools.lru_cache that retains the type signature
396
+ for the wrapped function arguments.
397
+ """
398
+ wrapper = functools .lru_cache (maxsize = maxsize )
399
+ return cast (Any , wrapper ) # type: ignore[no-any-return]
You can’t perform that action at this time.
0 commit comments