llama-cloud 0.0.3__py3-none-any.whl → 0.0.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of llama-cloud might be problematic. Click here for more details.

@@ -45,7 +45,6 @@ class ProjectsClient:
45
45
 
46
46
  client = LlamaCloud(
47
47
  token="YOUR_TOKEN",
48
- base_url="https://yourhost.com/path/to/api",
49
48
  )
50
49
  client.projects.list_projects()
51
50
  """
@@ -78,7 +77,6 @@ class ProjectsClient:
78
77
 
79
78
  client = LlamaCloud(
80
79
  token="YOUR_TOKEN",
81
- base_url="https://yourhost.com/path/to/api",
82
80
  )
83
81
  client.projects.create_project(
84
82
  request=ProjectCreate(
@@ -116,7 +114,6 @@ class ProjectsClient:
116
114
 
117
115
  client = LlamaCloud(
118
116
  token="YOUR_TOKEN",
119
- base_url="https://yourhost.com/path/to/api",
120
117
  )
121
118
  client.projects.upsert_project(
122
119
  request=ProjectCreate(
@@ -152,7 +149,6 @@ class ProjectsClient:
152
149
 
153
150
  client = LlamaCloud(
154
151
  token="YOUR_TOKEN",
155
- base_url="https://yourhost.com/path/to/api",
156
152
  )
157
153
  client.projects.get_project(
158
154
  project_id="string",
@@ -187,7 +183,6 @@ class ProjectsClient:
187
183
 
188
184
  client = LlamaCloud(
189
185
  token="YOUR_TOKEN",
190
- base_url="https://yourhost.com/path/to/api",
191
186
  )
192
187
  client.projects.update_existing_project(
193
188
  project_id="string",
@@ -222,7 +217,6 @@ class ProjectsClient:
222
217
 
223
218
  client = LlamaCloud(
224
219
  token="YOUR_TOKEN",
225
- base_url="https://yourhost.com/path/to/api",
226
220
  )
227
221
  client.projects.delete_project(
228
222
  project_id="string",
@@ -255,7 +249,6 @@ class ProjectsClient:
255
249
 
256
250
  client = LlamaCloud(
257
251
  token="YOUR_TOKEN",
258
- base_url="https://yourhost.com/path/to/api",
259
252
  )
260
253
  client.projects.get_datasets_for_project(
261
254
  project_id="string",
@@ -292,7 +285,6 @@ class ProjectsClient:
292
285
 
293
286
  client = LlamaCloud(
294
287
  token="YOUR_TOKEN",
295
- base_url="https://yourhost.com/path/to/api",
296
288
  )
297
289
  client.projects.create_eval_dataset_for_project(
298
290
  project_id="string",
@@ -335,7 +327,6 @@ class ProjectsClient:
335
327
 
336
328
  client = LlamaCloud(
337
329
  token="YOUR_TOKEN",
338
- base_url="https://yourhost.com/path/to/api",
339
330
  )
340
331
  client.projects.create_local_eval_set_for_project(
341
332
  project_id="string",
@@ -373,7 +364,6 @@ class ProjectsClient:
373
364
 
374
365
  client = LlamaCloud(
375
366
  token="YOUR_TOKEN",
376
- base_url="https://yourhost.com/path/to/api",
377
367
  )
378
368
  client.projects.get_local_evals_for_project(
379
369
  project_id="string",
@@ -406,7 +396,6 @@ class ProjectsClient:
406
396
 
407
397
  client = LlamaCloud(
408
398
  token="YOUR_TOKEN",
409
- base_url="https://yourhost.com/path/to/api",
410
399
  )
411
400
  client.projects.get_local_eval_sets_for_project(
412
401
  project_id="string",
@@ -443,7 +432,6 @@ class ProjectsClient:
443
432
 
444
433
  client = LlamaCloud(
445
434
  token="YOUR_TOKEN",
446
- base_url="https://yourhost.com/path/to/api",
447
435
  )
448
436
  client.projects.delete_local_eval_set(
449
437
  project_id="string",
@@ -480,7 +468,6 @@ class ProjectsClient:
480
468
 
481
469
  client = LlamaCloud(
482
470
  token="YOUR_TOKEN",
483
- base_url="https://yourhost.com/path/to/api",
484
471
  )
485
472
  client.projects.get_promptmixin_prompts(
486
473
  project_id="string",
@@ -516,7 +503,6 @@ class ProjectsClient:
516
503
 
517
504
  client = LlamaCloud(
518
505
  token="YOUR_TOKEN",
519
- base_url="https://yourhost.com/path/to/api",
520
506
  )
521
507
  client.projects.create_prompt_mixin_prompts(
522
508
  project_id="string",
@@ -562,7 +548,6 @@ class ProjectsClient:
562
548
 
563
549
  client = LlamaCloud(
564
550
  token="YOUR_TOKEN",
565
- base_url="https://yourhost.com/path/to/api",
566
551
  )
567
552
  client.projects.update_promptmixin_prompts(
568
553
  project_id="string",
@@ -606,7 +591,6 @@ class ProjectsClient:
606
591
 
607
592
  client = LlamaCloud(
608
593
  token="YOUR_TOKEN",
609
- base_url="https://yourhost.com/path/to/api",
610
594
  )
611
595
  client.projects.delete_prompt_mixin_prompts(
612
596
  project_id="string",
@@ -647,7 +631,6 @@ class AsyncProjectsClient:
647
631
 
648
632
  client = AsyncLlamaCloud(
649
633
  token="YOUR_TOKEN",
650
- base_url="https://yourhost.com/path/to/api",
651
634
  )
652
635
  await client.projects.list_projects()
653
636
  """
@@ -680,7 +663,6 @@ class AsyncProjectsClient:
680
663
 
681
664
  client = AsyncLlamaCloud(
682
665
  token="YOUR_TOKEN",
683
- base_url="https://yourhost.com/path/to/api",
684
666
  )
685
667
  await client.projects.create_project(
686
668
  request=ProjectCreate(
@@ -718,7 +700,6 @@ class AsyncProjectsClient:
718
700
 
719
701
  client = AsyncLlamaCloud(
720
702
  token="YOUR_TOKEN",
721
- base_url="https://yourhost.com/path/to/api",
722
703
  )
723
704
  await client.projects.upsert_project(
724
705
  request=ProjectCreate(
@@ -754,7 +735,6 @@ class AsyncProjectsClient:
754
735
 
755
736
  client = AsyncLlamaCloud(
756
737
  token="YOUR_TOKEN",
757
- base_url="https://yourhost.com/path/to/api",
758
738
  )
759
739
  await client.projects.get_project(
760
740
  project_id="string",
@@ -789,7 +769,6 @@ class AsyncProjectsClient:
789
769
 
790
770
  client = AsyncLlamaCloud(
791
771
  token="YOUR_TOKEN",
792
- base_url="https://yourhost.com/path/to/api",
793
772
  )
794
773
  await client.projects.update_existing_project(
795
774
  project_id="string",
@@ -824,7 +803,6 @@ class AsyncProjectsClient:
824
803
 
825
804
  client = AsyncLlamaCloud(
826
805
  token="YOUR_TOKEN",
827
- base_url="https://yourhost.com/path/to/api",
828
806
  )
829
807
  await client.projects.delete_project(
830
808
  project_id="string",
@@ -857,7 +835,6 @@ class AsyncProjectsClient:
857
835
 
858
836
  client = AsyncLlamaCloud(
859
837
  token="YOUR_TOKEN",
860
- base_url="https://yourhost.com/path/to/api",
861
838
  )
862
839
  await client.projects.get_datasets_for_project(
863
840
  project_id="string",
@@ -894,7 +871,6 @@ class AsyncProjectsClient:
894
871
 
895
872
  client = AsyncLlamaCloud(
896
873
  token="YOUR_TOKEN",
897
- base_url="https://yourhost.com/path/to/api",
898
874
  )
899
875
  await client.projects.create_eval_dataset_for_project(
900
876
  project_id="string",
@@ -937,7 +913,6 @@ class AsyncProjectsClient:
937
913
 
938
914
  client = AsyncLlamaCloud(
939
915
  token="YOUR_TOKEN",
940
- base_url="https://yourhost.com/path/to/api",
941
916
  )
942
917
  await client.projects.create_local_eval_set_for_project(
943
918
  project_id="string",
@@ -975,7 +950,6 @@ class AsyncProjectsClient:
975
950
 
976
951
  client = AsyncLlamaCloud(
977
952
  token="YOUR_TOKEN",
978
- base_url="https://yourhost.com/path/to/api",
979
953
  )
980
954
  await client.projects.get_local_evals_for_project(
981
955
  project_id="string",
@@ -1008,7 +982,6 @@ class AsyncProjectsClient:
1008
982
 
1009
983
  client = AsyncLlamaCloud(
1010
984
  token="YOUR_TOKEN",
1011
- base_url="https://yourhost.com/path/to/api",
1012
985
  )
1013
986
  await client.projects.get_local_eval_sets_for_project(
1014
987
  project_id="string",
@@ -1045,7 +1018,6 @@ class AsyncProjectsClient:
1045
1018
 
1046
1019
  client = AsyncLlamaCloud(
1047
1020
  token="YOUR_TOKEN",
1048
- base_url="https://yourhost.com/path/to/api",
1049
1021
  )
1050
1022
  await client.projects.delete_local_eval_set(
1051
1023
  project_id="string",
@@ -1082,7 +1054,6 @@ class AsyncProjectsClient:
1082
1054
 
1083
1055
  client = AsyncLlamaCloud(
1084
1056
  token="YOUR_TOKEN",
1085
- base_url="https://yourhost.com/path/to/api",
1086
1057
  )
1087
1058
  await client.projects.get_promptmixin_prompts(
1088
1059
  project_id="string",
@@ -1118,7 +1089,6 @@ class AsyncProjectsClient:
1118
1089
 
1119
1090
  client = AsyncLlamaCloud(
1120
1091
  token="YOUR_TOKEN",
1121
- base_url="https://yourhost.com/path/to/api",
1122
1092
  )
1123
1093
  await client.projects.create_prompt_mixin_prompts(
1124
1094
  project_id="string",
@@ -1164,7 +1134,6 @@ class AsyncProjectsClient:
1164
1134
 
1165
1135
  client = AsyncLlamaCloud(
1166
1136
  token="YOUR_TOKEN",
1167
- base_url="https://yourhost.com/path/to/api",
1168
1137
  )
1169
1138
  await client.projects.update_promptmixin_prompts(
1170
1139
  project_id="string",
@@ -1208,7 +1177,6 @@ class AsyncProjectsClient:
1208
1177
 
1209
1178
  client = AsyncLlamaCloud(
1210
1179
  token="YOUR_TOKEN",
1211
- base_url="https://yourhost.com/path/to/api",
1212
1180
  )
1213
1181
  await client.projects.delete_prompt_mixin_prompts(
1214
1182
  project_id="string",
@@ -1,6 +1,5 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from .api_key import ApiKey
4
3
  from .azure_open_ai_embedding import AzureOpenAiEmbedding
5
4
  from .base import Base
6
5
  from .base_prompt_template import BasePromptTemplate
@@ -126,7 +125,6 @@ from .validation_error import ValidationError
126
125
  from .validation_error_loc_item import ValidationErrorLocItem
127
126
 
128
127
  __all__ = [
129
- "ApiKey",
130
128
  "AzureOpenAiEmbedding",
131
129
  "Base",
132
130
  "BasePromptTemplate",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: llama-cloud
3
- Version: 0.0.3
3
+ Version: 0.0.5
4
4
  Summary:
5
5
  Author: Logan Markewich
6
6
  Author-email: logan@runllama.ai
@@ -1,49 +1,43 @@
1
- llama_cloud/__init__.py,sha256=6HaLTVk7FR6IzYhV_u93-G3K6-XFGg40piOUmghj34k,7561
2
- llama_cloud/client.py,sha256=RCaROySFECX9t10dsg8lBbTLlds0QD_x2zU9x9HfKYA,3807
1
+ llama_cloud/__init__.py,sha256=TyV-luF_NMB-tDeO2bHNSaSm_1Uw3R2eY8AhaT_gPUM,7519
2
+ llama_cloud/client.py,sha256=zteEQ5dmzOW5mgEqQ-i9PBh01Ocx0LIN6jxHPy9CBlI,3786
3
3
  llama_cloud/core/__init__.py,sha256=QJS3CJ2TYP2E1Tge0CS6Z7r8LTNzJHQVX1hD3558eP0,519
4
4
  llama_cloud/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
5
5
  llama_cloud/core/client_wrapper.py,sha256=xmj0jCdQ0ySzbSqHUWOkpRRy069y74I_HuXkWltcsVM,1507
6
6
  llama_cloud/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
7
7
  llama_cloud/core/jsonable_encoder.py,sha256=OewL6HcVqdSMCYDWwN0tsh7BZasBeOJZytrAxkH977k,3891
8
8
  llama_cloud/core/remove_none_from_dict.py,sha256=8m91FC3YuVem0Gm9_sXhJ2tGvP33owJJdrqCLEdowGw,330
9
+ llama_cloud/environment.py,sha256=q4q-uY5WgcSlzfHwEANOqFQPu0lstqvMnVOsSfifMKo,168
9
10
  llama_cloud/errors/__init__.py,sha256=pbbVUFtB9LCocA1RMWMMF_RKjsy5YkOKX5BAuE49w6g,170
10
11
  llama_cloud/errors/unprocessable_entity_error.py,sha256=FvR7XPlV3Xx5nu8HNlmLhBRdk4so_gCHjYT5PyZe6sM,313
11
- llama_cloud/resources/__init__.py,sha256=oNfkOfXcF9JLlasW7zdX5eo3KNrfzgpfQlCpeyS8Gnw,1016
12
- llama_cloud/resources/api_keys/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
13
- llama_cloud/resources/api_keys/client.py,sha256=do7rqxIJFZzXUpG9QaPp9U1BsS13j1x5o4QRatzeWbs,11780
14
- llama_cloud/resources/billing/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
15
- llama_cloud/resources/billing/client.py,sha256=nXCbOAh4321BsGyBfxQ5nX2-bfvXBmuboI__BDFMTzo,9556
12
+ llama_cloud/resources/__init__.py,sha256=CZM0cBk0JjOYkzt1OIl9iQzVBQmD4KuWJsIhrf6BMW0,887
16
13
  llama_cloud/resources/component_definitions/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
17
- llama_cloud/resources/component_definitions/client.py,sha256=YQxKL7QcUumgUu_Imwx0Q0wh3gahstnu9FXwG3m9cVM,7991
14
+ llama_cloud/resources/component_definitions/client.py,sha256=-Hv7W64P59flEf8osaG6L8CoyuJWDfUQh6zPR-nFvmI,7649
18
15
  llama_cloud/resources/data_sinks/__init__.py,sha256=nsMEyxkVilxvQGSdJi0Z0yKZoTaTWewZIGJNoMwNDsw,205
19
- llama_cloud/resources/data_sinks/client.py,sha256=tMATZ_y69YDyHHf0W819oZe_DZCf4LhbXJYkoxloqWY,20389
16
+ llama_cloud/resources/data_sinks/client.py,sha256=ABIi7PQU7EyGN_dRyl4MgkYD8Rb1ZIbbFvxX3Xv-D3I,19705
20
17
  llama_cloud/resources/data_sinks/types/__init__.py,sha256=M9AO57_TUUgjUcGOhxcROql5U7UbJDbEm7aQj3YqU2I,269
21
18
  llama_cloud/resources/data_sinks/types/data_sink_update_component.py,sha256=TjBOpvPvUIyi-NT1Gv1vShMoe-jzDKc8UYaFfo7XOO8,249
22
19
  llama_cloud/resources/data_sinks/types/data_sink_update_component_one.py,sha256=wNaRFihU7fW2nhLALvqcRZngS9-rudxn_dgmh_z6FRs,639
23
20
  llama_cloud/resources/data_sources/__init__.py,sha256=CCs8ur4fvszPjy0GpTWmMjUAx0WykNgKDKFDNbkYLeM,289
24
- llama_cloud/resources/data_sources/client.py,sha256=l3jQZUj1CqM4ZBZMcCxmREU-ORiw4TBkQqblUE7I6Zk,21601
21
+ llama_cloud/resources/data_sources/client.py,sha256=NtLwngkjp6O-ekTPjWHsw9Zt487udK1XfHYlWgBQyLA,20917
25
22
  llama_cloud/resources/data_sources/types/__init__.py,sha256=iOdDXvAM6w80PR62JCscsTOwzDIXHHcG_Ypv18DEdic,410
26
23
  llama_cloud/resources/data_sources/types/data_source_update_component.py,sha256=8MoJgdjYmN5WqntDpMXX34WJsf-Wsn0gYw_0t9SOTTA,257
27
24
  llama_cloud/resources/data_sources/types/data_source_update_component_one.py,sha256=jfHjlwkUonW0Z73XhJ3w0BZpmptuXU205FWXS1Ucf44,742
28
25
  llama_cloud/resources/data_sources/types/data_source_update_custom_metadata_value.py,sha256=3aFC-p8MSxjhOu2nFtqk0pixj6RqNqcFnbOYngUdZUk,215
29
- llama_cloud/resources/deprecated/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
30
- llama_cloud/resources/deprecated/client.py,sha256=jPiaKIil8o_qTHdqkIDxZIDvu7l4cWaOg0CWsXCHk80,37452
31
26
  llama_cloud/resources/evals/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
32
- llama_cloud/resources/evals/client.py,sha256=FvpQtE-KWbGHXEpsOCc-3aqbHsGNhVzj2BP0v57tVTM,28747
27
+ llama_cloud/resources/evals/client.py,sha256=mIgyzUj74Ia1YYEenGtpFEAJuFrgm6g_c3JfoJg4Zuk,27607
33
28
  llama_cloud/resources/files/__init__.py,sha256=aZpyTj6KpZvA5XVwmuo1sIlRs7ba98btxVBZ6j5vIsI,155
34
- llama_cloud/resources/files/client.py,sha256=y_OTkj1hiAwQgO72h6UyTUCiTMzYcCT971Ienr3O2wU,22874
29
+ llama_cloud/resources/files/client.py,sha256=iOMMoyXenOsbB9Ba_8Jpy3dy9bFQNO5I-DycUDHPTlc,22190
35
30
  llama_cloud/resources/files/types/__init__.py,sha256=ZWnnYWuDYZSfUJc7Jv3HyovzijdB--DTK4YB-uPcDsA,181
36
31
  llama_cloud/resources/files/types/file_create_resource_info_value.py,sha256=R7Y-CJf7fnbvIqE3xOI5XOrmPwLbVJLC7zpxMu8Zopk,201
37
32
  llama_cloud/resources/parsing/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
38
- llama_cloud/resources/parsing/client.py,sha256=MDV35kzA536QKEsfEw6iO19dW5mgpQTv7r43qhaGRoM,37452
33
+ llama_cloud/resources/parsing/client.py,sha256=lm02dcjE6U1BpMMIrLaJZ3Yzji-gRX4jPgZrxgN_t50,36084
39
34
  llama_cloud/resources/pipelines/__init__.py,sha256=H7yaFIN62vjuhU3TOKzzuf8qpxZRgw1xVa-eyig-2YU,175
40
- llama_cloud/resources/pipelines/client.py,sha256=5z2kbnLEdrKKaAnBAyo7dJQxKeMuexFsbK2qekU0y4A,106786
35
+ llama_cloud/resources/pipelines/client.py,sha256=98TbkLvsB4CTPTS3fUgFQEN0y8WkmE-1HMp70on93k0,103480
41
36
  llama_cloud/resources/pipelines/types/__init__.py,sha256=xuT4OBPLrRfEe-E3UVdJvRjl9jTp7tNBK_YzZBb6Kj8,212
42
37
  llama_cloud/resources/pipelines/types/pipeline_file_update_custom_metadata_value.py,sha256=trI48WLxPcAqV9207Q6-3cj1nl4EGlZpw7En56ZsPgg,217
43
38
  llama_cloud/resources/projects/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
44
- llama_cloud/resources/projects/client.py,sha256=h1tYbVeorBHpXDEy4S5PpSzCE7BLdTeaqmCdrrzUwA0,48566
45
- llama_cloud/types/__init__.py,sha256=xKnYxctZU1sCSVv6_GNg4w6t_o9vJIBTcD9Lqgu32Ts,10347
46
- llama_cloud/types/api_key.py,sha256=QGEPX-kwPh9n4OU4ujUvTWzItdqbeUa9Wu8XhDE0sXY,1309
39
+ llama_cloud/resources/projects/client.py,sha256=gqjSRfpNK8rxECpHGluiTLxF8qGX2LvNIPJNujfNQ9E,46742
40
+ llama_cloud/types/__init__.py,sha256=0cs8VGx_F_KBLMju1wnOVlvT5O3VGKNzybKL9e1nKb0,10305
47
41
  llama_cloud/types/azure_open_ai_embedding.py,sha256=Ne7DkOTpdwGsH2DUVIGdT5T8Nmk6J61lHGbmgG90LuY,3438
48
42
  llama_cloud/types/base.py,sha256=cn_Zn61yLMDCMm1iZTPvKILSRlqRzOqZtSYyYBY5dIE,938
49
43
  llama_cloud/types/base_prompt_template.py,sha256=GO9k4EDVMf3gRQIA4bVfXqgIMKnKTXhi1JlGvhqXDRY,1576
@@ -167,7 +161,7 @@ llama_cloud/types/token_text_splitter.py,sha256=Mv8xBCvMXyYuQq1KInPe65O0YYCLWxs6
167
161
  llama_cloud/types/transformation_category_names.py,sha256=0xjYe-mDW9OKbTGqL5fSbTvqsfrG4LDu_stW_ubVLl4,582
168
162
  llama_cloud/types/validation_error.py,sha256=yZDLtjUHDY5w82Ra6CW0H9sLAr18R0RY1UNgJKR72DQ,1084
169
163
  llama_cloud/types/validation_error_loc_item.py,sha256=LAtjCHIllWRBFXvAZ5QZpp7CPXjdtN9EB7HrLVo6EP0,128
170
- llama_cloud-0.0.3.dist-info/LICENSE,sha256=_iNqtPcw1Ue7dZKwOwgPtbegMUkWVy15hC7bffAdNmY,1067
171
- llama_cloud-0.0.3.dist-info/METADATA,sha256=J4FMJJn6SiqhHzeaumB2xHVC_NIDXDaVLS0AHyFfnLw,750
172
- llama_cloud-0.0.3.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
173
- llama_cloud-0.0.3.dist-info/RECORD,,
164
+ llama_cloud-0.0.5.dist-info/LICENSE,sha256=_iNqtPcw1Ue7dZKwOwgPtbegMUkWVy15hC7bffAdNmY,1067
165
+ llama_cloud-0.0.5.dist-info/METADATA,sha256=pkFLMMAVCJ02bq71qKh3TTWjL_7gcVR6HwVsMEzvceQ,750
166
+ llama_cloud-0.0.5.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
167
+ llama_cloud-0.0.5.dist-info/RECORD,,
@@ -1,2 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
@@ -1,305 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
- import urllib.parse
5
- from json.decoder import JSONDecodeError
6
-
7
- from ...core.api_error import ApiError
8
- from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
9
- from ...core.jsonable_encoder import jsonable_encoder
10
- from ...errors.unprocessable_entity_error import UnprocessableEntityError
11
- from ...types.api_key import ApiKey
12
- from ...types.http_validation_error import HttpValidationError
13
-
14
- try:
15
- import pydantic
16
- if pydantic.__version__.startswith("1."):
17
- raise ImportError
18
- import pydantic.v1 as pydantic # type: ignore
19
- except ImportError:
20
- import pydantic # type: ignore
21
-
22
- # this is used as the default value for optional parameters
23
- OMIT = typing.cast(typing.Any, ...)
24
-
25
-
26
- class ApiKeysClient:
27
- def __init__(self, *, client_wrapper: SyncClientWrapper):
28
- self._client_wrapper = client_wrapper
29
-
30
- def get_keys(self) -> typing.List[ApiKey]:
31
- """
32
- Get all API Keys for a user.
33
-
34
- ---
35
- from llama_cloud.client import LlamaCloud
36
-
37
- client = LlamaCloud(
38
- token="YOUR_TOKEN",
39
- base_url="https://yourhost.com/path/to/api",
40
- )
41
- client.api_keys.get_keys()
42
- """
43
- _response = self._client_wrapper.httpx_client.request(
44
- "GET",
45
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/api-keys"),
46
- headers=self._client_wrapper.get_headers(),
47
- timeout=60,
48
- )
49
- if 200 <= _response.status_code < 300:
50
- return pydantic.parse_obj_as(typing.List[ApiKey], _response.json()) # type: ignore
51
- if _response.status_code == 422:
52
- raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
53
- try:
54
- _response_json = _response.json()
55
- except JSONDecodeError:
56
- raise ApiError(status_code=_response.status_code, body=_response.text)
57
- raise ApiError(status_code=_response.status_code, body=_response_json)
58
-
59
- def generate_key(self, *, name: typing.Optional[str] = OMIT) -> ApiKey:
60
- """
61
- Generate a new API Key.
62
-
63
- Parameters:
64
- - name: typing.Optional[str].
65
- ---
66
- from llama_cloud.client import LlamaCloud
67
-
68
- client = LlamaCloud(
69
- token="YOUR_TOKEN",
70
- base_url="https://yourhost.com/path/to/api",
71
- )
72
- client.api_keys.generate_key()
73
- """
74
- _request: typing.Dict[str, typing.Any] = {}
75
- if name is not OMIT:
76
- _request["name"] = name
77
- _response = self._client_wrapper.httpx_client.request(
78
- "POST",
79
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/api-keys"),
80
- json=jsonable_encoder(_request),
81
- headers=self._client_wrapper.get_headers(),
82
- timeout=60,
83
- )
84
- if 200 <= _response.status_code < 300:
85
- return pydantic.parse_obj_as(ApiKey, _response.json()) # type: ignore
86
- if _response.status_code == 422:
87
- raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
88
- try:
89
- _response_json = _response.json()
90
- except JSONDecodeError:
91
- raise ApiError(status_code=_response.status_code, body=_response.text)
92
- raise ApiError(status_code=_response.status_code, body=_response_json)
93
-
94
- def update_existing_api_key(self, api_key_id: str, *, name: typing.Optional[str] = OMIT) -> ApiKey:
95
- """
96
- Update name of an existing API Key.
97
-
98
- Parameters:
99
- - api_key_id: str.
100
-
101
- - name: typing.Optional[str].
102
- ---
103
- from llama_cloud.client import LlamaCloud
104
-
105
- client = LlamaCloud(
106
- token="YOUR_TOKEN",
107
- base_url="https://yourhost.com/path/to/api",
108
- )
109
- client.api_keys.update_existing_api_key(
110
- api_key_id="string",
111
- )
112
- """
113
- _request: typing.Dict[str, typing.Any] = {}
114
- if name is not OMIT:
115
- _request["name"] = name
116
- _response = self._client_wrapper.httpx_client.request(
117
- "PUT",
118
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/api-keys/{api_key_id}"),
119
- json=jsonable_encoder(_request),
120
- headers=self._client_wrapper.get_headers(),
121
- timeout=60,
122
- )
123
- if 200 <= _response.status_code < 300:
124
- return pydantic.parse_obj_as(ApiKey, _response.json()) # type: ignore
125
- if _response.status_code == 422:
126
- raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
127
- try:
128
- _response_json = _response.json()
129
- except JSONDecodeError:
130
- raise ApiError(status_code=_response.status_code, body=_response.text)
131
- raise ApiError(status_code=_response.status_code, body=_response_json)
132
-
133
- def delete_api_key(self, api_key_id: str) -> None:
134
- """
135
- Delete an API Key by ID.
136
-
137
- Parameters:
138
- - api_key_id: str.
139
- ---
140
- from llama_cloud.client import LlamaCloud
141
-
142
- client = LlamaCloud(
143
- token="YOUR_TOKEN",
144
- base_url="https://yourhost.com/path/to/api",
145
- )
146
- client.api_keys.delete_api_key(
147
- api_key_id="string",
148
- )
149
- """
150
- _response = self._client_wrapper.httpx_client.request(
151
- "DELETE",
152
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/api-keys/{api_key_id}"),
153
- headers=self._client_wrapper.get_headers(),
154
- timeout=60,
155
- )
156
- if 200 <= _response.status_code < 300:
157
- return
158
- if _response.status_code == 422:
159
- raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
160
- try:
161
- _response_json = _response.json()
162
- except JSONDecodeError:
163
- raise ApiError(status_code=_response.status_code, body=_response.text)
164
- raise ApiError(status_code=_response.status_code, body=_response_json)
165
-
166
-
167
- class AsyncApiKeysClient:
168
- def __init__(self, *, client_wrapper: AsyncClientWrapper):
169
- self._client_wrapper = client_wrapper
170
-
171
- async def get_keys(self) -> typing.List[ApiKey]:
172
- """
173
- Get all API Keys for a user.
174
-
175
- ---
176
- from llama_cloud.client import AsyncLlamaCloud
177
-
178
- client = AsyncLlamaCloud(
179
- token="YOUR_TOKEN",
180
- base_url="https://yourhost.com/path/to/api",
181
- )
182
- await client.api_keys.get_keys()
183
- """
184
- _response = await self._client_wrapper.httpx_client.request(
185
- "GET",
186
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/api-keys"),
187
- headers=self._client_wrapper.get_headers(),
188
- timeout=60,
189
- )
190
- if 200 <= _response.status_code < 300:
191
- return pydantic.parse_obj_as(typing.List[ApiKey], _response.json()) # type: ignore
192
- if _response.status_code == 422:
193
- raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
194
- try:
195
- _response_json = _response.json()
196
- except JSONDecodeError:
197
- raise ApiError(status_code=_response.status_code, body=_response.text)
198
- raise ApiError(status_code=_response.status_code, body=_response_json)
199
-
200
- async def generate_key(self, *, name: typing.Optional[str] = OMIT) -> ApiKey:
201
- """
202
- Generate a new API Key.
203
-
204
- Parameters:
205
- - name: typing.Optional[str].
206
- ---
207
- from llama_cloud.client import AsyncLlamaCloud
208
-
209
- client = AsyncLlamaCloud(
210
- token="YOUR_TOKEN",
211
- base_url="https://yourhost.com/path/to/api",
212
- )
213
- await client.api_keys.generate_key()
214
- """
215
- _request: typing.Dict[str, typing.Any] = {}
216
- if name is not OMIT:
217
- _request["name"] = name
218
- _response = await self._client_wrapper.httpx_client.request(
219
- "POST",
220
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/api-keys"),
221
- json=jsonable_encoder(_request),
222
- headers=self._client_wrapper.get_headers(),
223
- timeout=60,
224
- )
225
- if 200 <= _response.status_code < 300:
226
- return pydantic.parse_obj_as(ApiKey, _response.json()) # type: ignore
227
- if _response.status_code == 422:
228
- raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
229
- try:
230
- _response_json = _response.json()
231
- except JSONDecodeError:
232
- raise ApiError(status_code=_response.status_code, body=_response.text)
233
- raise ApiError(status_code=_response.status_code, body=_response_json)
234
-
235
- async def update_existing_api_key(self, api_key_id: str, *, name: typing.Optional[str] = OMIT) -> ApiKey:
236
- """
237
- Update name of an existing API Key.
238
-
239
- Parameters:
240
- - api_key_id: str.
241
-
242
- - name: typing.Optional[str].
243
- ---
244
- from llama_cloud.client import AsyncLlamaCloud
245
-
246
- client = AsyncLlamaCloud(
247
- token="YOUR_TOKEN",
248
- base_url="https://yourhost.com/path/to/api",
249
- )
250
- await client.api_keys.update_existing_api_key(
251
- api_key_id="string",
252
- )
253
- """
254
- _request: typing.Dict[str, typing.Any] = {}
255
- if name is not OMIT:
256
- _request["name"] = name
257
- _response = await self._client_wrapper.httpx_client.request(
258
- "PUT",
259
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/api-keys/{api_key_id}"),
260
- json=jsonable_encoder(_request),
261
- headers=self._client_wrapper.get_headers(),
262
- timeout=60,
263
- )
264
- if 200 <= _response.status_code < 300:
265
- return pydantic.parse_obj_as(ApiKey, _response.json()) # type: ignore
266
- if _response.status_code == 422:
267
- raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
268
- try:
269
- _response_json = _response.json()
270
- except JSONDecodeError:
271
- raise ApiError(status_code=_response.status_code, body=_response.text)
272
- raise ApiError(status_code=_response.status_code, body=_response_json)
273
-
274
- async def delete_api_key(self, api_key_id: str) -> None:
275
- """
276
- Delete an API Key by ID.
277
-
278
- Parameters:
279
- - api_key_id: str.
280
- ---
281
- from llama_cloud.client import AsyncLlamaCloud
282
-
283
- client = AsyncLlamaCloud(
284
- token="YOUR_TOKEN",
285
- base_url="https://yourhost.com/path/to/api",
286
- )
287
- await client.api_keys.delete_api_key(
288
- api_key_id="string",
289
- )
290
- """
291
- _response = await self._client_wrapper.httpx_client.request(
292
- "DELETE",
293
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/api-keys/{api_key_id}"),
294
- headers=self._client_wrapper.get_headers(),
295
- timeout=60,
296
- )
297
- if 200 <= _response.status_code < 300:
298
- return
299
- if _response.status_code == 422:
300
- raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
301
- try:
302
- _response_json = _response.json()
303
- except JSONDecodeError:
304
- raise ApiError(status_code=_response.status_code, body=_response.text)
305
- raise ApiError(status_code=_response.status_code, body=_response_json)
@@ -1,2 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-