43
43
"Transport" ,
44
44
"ProxiesTypes" ,
45
45
"RequestOptions" ,
46
- "CleanlabCodex " ,
47
- "AsyncCleanlabCodex " ,
46
+ "Cleanlab " ,
47
+ "AsyncCleanlab " ,
48
48
"Client" ,
49
49
"AsyncClient" ,
50
50
]
56
56
}
57
57
58
58
59
- class CleanlabCodex (SyncAPIClient ):
59
+ class Cleanlab (SyncAPIClient ):
60
60
health : health .HealthResource
61
61
organizations : organizations .OrganizationsResource
62
62
users : users .UsersResource
63
63
projects : projects .ProjectsResource
64
- with_raw_response : CleanlabCodexWithRawResponse
65
- with_streaming_response : CleanlabCodexWithStreamedResponse
64
+ with_raw_response : CleanlabWithRawResponse
65
+ with_streaming_response : CleanlabWithStreamedResponse
66
66
67
67
# client options
68
68
bearer_token : str | None
@@ -97,7 +97,7 @@ def __init__(
97
97
# part of our public interface in the future.
98
98
_strict_response_validation : bool = False ,
99
99
) -> None :
100
- """Construct a new synchronous Cleanlab Codex client instance.
100
+ """Construct a new synchronous Cleanlab client instance.
101
101
102
102
This automatically infers the following arguments from their corresponding environment variables if they are not provided:
103
103
- `bearer_token` from `BEARER_TOKEN`
@@ -118,14 +118,14 @@ def __init__(
118
118
119
119
self ._environment = environment
120
120
121
- base_url_env = os .environ .get ("CLEANLAB_CODEX_BASE_URL " )
121
+ base_url_env = os .environ .get ("CLEANLAB_BASE_URL " )
122
122
if is_given (base_url ) and base_url is not None :
123
123
# cast required because mypy doesn't understand the type narrowing
124
124
base_url = cast ("str | httpx.URL" , base_url ) # pyright: ignore[reportUnnecessaryCast]
125
125
elif is_given (environment ):
126
126
if base_url_env and base_url is not None :
127
127
raise ValueError (
128
- "Ambiguous URL; The `CLEANLAB_CODEX_BASE_URL ` env var and the `environment` argument are given. If you want to use the environment, you must pass base_url=None" ,
128
+ "Ambiguous URL; The `CLEANLAB_BASE_URL ` env var and the `environment` argument are given. If you want to use the environment, you must pass base_url=None" ,
129
129
)
130
130
131
131
try :
@@ -157,8 +157,8 @@ def __init__(
157
157
self .organizations = organizations .OrganizationsResource (self )
158
158
self .users = users .UsersResource (self )
159
159
self .projects = projects .ProjectsResource (self )
160
- self .with_raw_response = CleanlabCodexWithRawResponse (self )
161
- self .with_streaming_response = CleanlabCodexWithStreamedResponse (self )
160
+ self .with_raw_response = CleanlabWithRawResponse (self )
161
+ self .with_streaming_response = CleanlabWithStreamedResponse (self )
162
162
163
163
@property
164
164
@override
@@ -318,13 +318,13 @@ def _make_status_error(
318
318
return APIStatusError (err_msg , response = response , body = body )
319
319
320
320
321
- class AsyncCleanlabCodex (AsyncAPIClient ):
321
+ class AsyncCleanlab (AsyncAPIClient ):
322
322
health : health .AsyncHealthResource
323
323
organizations : organizations .AsyncOrganizationsResource
324
324
users : users .AsyncUsersResource
325
325
projects : projects .AsyncProjectsResource
326
- with_raw_response : AsyncCleanlabCodexWithRawResponse
327
- with_streaming_response : AsyncCleanlabCodexWithStreamedResponse
326
+ with_raw_response : AsyncCleanlabWithRawResponse
327
+ with_streaming_response : AsyncCleanlabWithStreamedResponse
328
328
329
329
# client options
330
330
bearer_token : str | None
@@ -359,7 +359,7 @@ def __init__(
359
359
# part of our public interface in the future.
360
360
_strict_response_validation : bool = False ,
361
361
) -> None :
362
- """Construct a new async Cleanlab Codex client instance.
362
+ """Construct a new async Cleanlab client instance.
363
363
364
364
This automatically infers the following arguments from their corresponding environment variables if they are not provided:
365
365
- `bearer_token` from `BEARER_TOKEN`
@@ -380,14 +380,14 @@ def __init__(
380
380
381
381
self ._environment = environment
382
382
383
- base_url_env = os .environ .get ("CLEANLAB_CODEX_BASE_URL " )
383
+ base_url_env = os .environ .get ("CLEANLAB_BASE_URL " )
384
384
if is_given (base_url ) and base_url is not None :
385
385
# cast required because mypy doesn't understand the type narrowing
386
386
base_url = cast ("str | httpx.URL" , base_url ) # pyright: ignore[reportUnnecessaryCast]
387
387
elif is_given (environment ):
388
388
if base_url_env and base_url is not None :
389
389
raise ValueError (
390
- "Ambiguous URL; The `CLEANLAB_CODEX_BASE_URL ` env var and the `environment` argument are given. If you want to use the environment, you must pass base_url=None" ,
390
+ "Ambiguous URL; The `CLEANLAB_BASE_URL ` env var and the `environment` argument are given. If you want to use the environment, you must pass base_url=None" ,
391
391
)
392
392
393
393
try :
@@ -419,8 +419,8 @@ def __init__(
419
419
self .organizations = organizations .AsyncOrganizationsResource (self )
420
420
self .users = users .AsyncUsersResource (self )
421
421
self .projects = projects .AsyncProjectsResource (self )
422
- self .with_raw_response = AsyncCleanlabCodexWithRawResponse (self )
423
- self .with_streaming_response = AsyncCleanlabCodexWithStreamedResponse (self )
422
+ self .with_raw_response = AsyncCleanlabWithRawResponse (self )
423
+ self .with_streaming_response = AsyncCleanlabWithStreamedResponse (self )
424
424
425
425
@property
426
426
@override
@@ -580,38 +580,38 @@ def _make_status_error(
580
580
return APIStatusError (err_msg , response = response , body = body )
581
581
582
582
583
- class CleanlabCodexWithRawResponse :
584
- def __init__ (self , client : CleanlabCodex ) -> None :
583
+ class CleanlabWithRawResponse :
584
+ def __init__ (self , client : Cleanlab ) -> None :
585
585
self .health = health .HealthResourceWithRawResponse (client .health )
586
586
self .organizations = organizations .OrganizationsResourceWithRawResponse (client .organizations )
587
587
self .users = users .UsersResourceWithRawResponse (client .users )
588
588
self .projects = projects .ProjectsResourceWithRawResponse (client .projects )
589
589
590
590
591
- class AsyncCleanlabCodexWithRawResponse :
592
- def __init__ (self , client : AsyncCleanlabCodex ) -> None :
591
+ class AsyncCleanlabWithRawResponse :
592
+ def __init__ (self , client : AsyncCleanlab ) -> None :
593
593
self .health = health .AsyncHealthResourceWithRawResponse (client .health )
594
594
self .organizations = organizations .AsyncOrganizationsResourceWithRawResponse (client .organizations )
595
595
self .users = users .AsyncUsersResourceWithRawResponse (client .users )
596
596
self .projects = projects .AsyncProjectsResourceWithRawResponse (client .projects )
597
597
598
598
599
- class CleanlabCodexWithStreamedResponse :
600
- def __init__ (self , client : CleanlabCodex ) -> None :
599
+ class CleanlabWithStreamedResponse :
600
+ def __init__ (self , client : Cleanlab ) -> None :
601
601
self .health = health .HealthResourceWithStreamingResponse (client .health )
602
602
self .organizations = organizations .OrganizationsResourceWithStreamingResponse (client .organizations )
603
603
self .users = users .UsersResourceWithStreamingResponse (client .users )
604
604
self .projects = projects .ProjectsResourceWithStreamingResponse (client .projects )
605
605
606
606
607
- class AsyncCleanlabCodexWithStreamedResponse :
608
- def __init__ (self , client : AsyncCleanlabCodex ) -> None :
607
+ class AsyncCleanlabWithStreamedResponse :
608
+ def __init__ (self , client : AsyncCleanlab ) -> None :
609
609
self .health = health .AsyncHealthResourceWithStreamingResponse (client .health )
610
610
self .organizations = organizations .AsyncOrganizationsResourceWithStreamingResponse (client .organizations )
611
611
self .users = users .AsyncUsersResourceWithStreamingResponse (client .users )
612
612
self .projects = projects .AsyncProjectsResourceWithStreamingResponse (client .projects )
613
613
614
614
615
- Client = CleanlabCodex
615
+ Client = Cleanlab
616
616
617
- AsyncClient = AsyncCleanlabCodex
617
+ AsyncClient = AsyncCleanlab
0 commit comments