pygeai 0.6.0b3__py3-none-any.whl → 0.6.0b6__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.
Files changed (145) hide show
  1. pygeai/_docs/Makefile +20 -0
  2. pygeai/_docs/make.bat +35 -0
  3. pygeai/_docs/source/conf.py +45 -0
  4. pygeai/_docs/source/content/ai_lab/cli.rst +747 -0
  5. pygeai/_docs/source/content/ai_lab/models.rst +1600 -0
  6. pygeai/_docs/source/content/ai_lab/runner.rst +253 -0
  7. pygeai/_docs/source/content/ai_lab/spec.rst +431 -0
  8. pygeai/_docs/source/content/ai_lab/usage.rst +1011 -0
  9. pygeai/_docs/source/content/ai_lab.rst +102 -0
  10. pygeai/_docs/source/content/api_reference/chat.rst +328 -0
  11. pygeai/_docs/source/content/api_reference/embeddings.rst +124 -0
  12. pygeai/_docs/source/content/api_reference/project.rst +552 -0
  13. pygeai/_docs/source/content/api_reference/rag.rst +710 -0
  14. pygeai/_docs/source/content/api_reference.rst +46 -0
  15. pygeai/_docs/source/content/chat_gui.rst +121 -0
  16. pygeai/_docs/source/content/cli.rst +126 -0
  17. pygeai/_docs/source/content/debugger.rst +188 -0
  18. pygeai/_docs/source/content/intro.rst +67 -0
  19. pygeai/_docs/source/content/modules.rst +7 -0
  20. pygeai/_docs/source/content/quickstart.rst +143 -0
  21. pygeai/_docs/source/content/samples.rst +394 -0
  22. pygeai/_docs/source/index.rst +21 -0
  23. pygeai/_docs/source/modules.rst +7 -0
  24. pygeai/_docs/source/pygeai.admin.rst +29 -0
  25. pygeai/_docs/source/pygeai.assistant.data.rst +21 -0
  26. pygeai/_docs/source/pygeai.assistant.data_analyst.rst +29 -0
  27. pygeai/_docs/source/pygeai.assistant.rag.rst +53 -0
  28. pygeai/_docs/source/pygeai.assistant.rst +55 -0
  29. pygeai/_docs/source/pygeai.chat.rst +69 -0
  30. pygeai/_docs/source/pygeai.cli.commands.flows.rst +10 -0
  31. pygeai/_docs/source/pygeai.cli.commands.lab.rst +53 -0
  32. pygeai/_docs/source/pygeai.cli.commands.rst +198 -0
  33. pygeai/_docs/source/pygeai.cli.rst +54 -0
  34. pygeai/_docs/source/pygeai.cli.texts.rst +21 -0
  35. pygeai/_docs/source/pygeai.core.base.rst +53 -0
  36. pygeai/_docs/source/pygeai.core.common.rst +37 -0
  37. pygeai/_docs/source/pygeai.core.embeddings.rst +61 -0
  38. pygeai/_docs/source/pygeai.core.feedback.rst +37 -0
  39. pygeai/_docs/source/pygeai.core.files.rst +61 -0
  40. pygeai/_docs/source/pygeai.core.llm.rst +29 -0
  41. pygeai/_docs/source/pygeai.core.plugins.rst +37 -0
  42. pygeai/_docs/source/pygeai.core.rerank.rst +53 -0
  43. pygeai/_docs/source/pygeai.core.rst +63 -0
  44. pygeai/_docs/source/pygeai.core.secrets.rst +29 -0
  45. pygeai/_docs/source/pygeai.core.services.llm.rst +29 -0
  46. pygeai/_docs/source/pygeai.core.services.rst +37 -0
  47. pygeai/_docs/source/pygeai.core.utils.rst +21 -0
  48. pygeai/_docs/source/pygeai.dbg.rst +21 -0
  49. pygeai/_docs/source/pygeai.evaluation.dataset.rst +29 -0
  50. pygeai/_docs/source/pygeai.evaluation.plan.rst +29 -0
  51. pygeai/_docs/source/pygeai.evaluation.result.rst +29 -0
  52. pygeai/_docs/source/pygeai.evaluation.rst +31 -0
  53. pygeai/_docs/source/pygeai.flows.rst +29 -0
  54. pygeai/_docs/source/pygeai.gam.rst +29 -0
  55. pygeai/_docs/source/pygeai.health.rst +29 -0
  56. pygeai/_docs/source/pygeai.lab.agents.rst +37 -0
  57. pygeai/_docs/source/pygeai.lab.processes.rst +37 -0
  58. pygeai/_docs/source/pygeai.lab.rst +65 -0
  59. pygeai/_docs/source/pygeai.lab.spec.rst +29 -0
  60. pygeai/_docs/source/pygeai.lab.strategies.rst +37 -0
  61. pygeai/_docs/source/pygeai.lab.tools.rst +37 -0
  62. pygeai/_docs/source/pygeai.man.man1.rst +10 -0
  63. pygeai/_docs/source/pygeai.man.rst +18 -0
  64. pygeai/_docs/source/pygeai.migration.rst +29 -0
  65. pygeai/_docs/source/pygeai.organization.limits.rst +45 -0
  66. pygeai/_docs/source/pygeai.organization.rst +61 -0
  67. pygeai/_docs/source/pygeai.proxy.rst +53 -0
  68. pygeai/_docs/source/pygeai.rst +33 -0
  69. pygeai/_docs/source/pygeai.tests.admin.rst +21 -0
  70. pygeai/_docs/source/pygeai.tests.assistants.rag.rst +37 -0
  71. pygeai/_docs/source/pygeai.tests.assistants.rst +45 -0
  72. pygeai/_docs/source/pygeai.tests.chat.rst +45 -0
  73. pygeai/_docs/source/pygeai.tests.cli.commands.lab.rst +37 -0
  74. pygeai/_docs/source/pygeai.tests.cli.commands.rst +149 -0
  75. pygeai/_docs/source/pygeai.tests.cli.docker.rst +10 -0
  76. pygeai/_docs/source/pygeai.tests.cli.rst +30 -0
  77. pygeai/_docs/source/pygeai.tests.core.base.data.rst +29 -0
  78. pygeai/_docs/source/pygeai.tests.core.base.rst +37 -0
  79. pygeai/_docs/source/pygeai.tests.core.common.data.rst +10 -0
  80. pygeai/_docs/source/pygeai.tests.core.common.rst +37 -0
  81. pygeai/_docs/source/pygeai.tests.core.embeddings.rst +21 -0
  82. pygeai/_docs/source/pygeai.tests.core.feedback.rst +21 -0
  83. pygeai/_docs/source/pygeai.tests.core.files.rst +45 -0
  84. pygeai/_docs/source/pygeai.tests.core.llm.rst +21 -0
  85. pygeai/_docs/source/pygeai.tests.core.rerank.rst +37 -0
  86. pygeai/_docs/source/pygeai.tests.core.rst +38 -0
  87. pygeai/_docs/source/pygeai.tests.core.secrets.rst +21 -0
  88. pygeai/_docs/source/pygeai.tests.core.services.rst +21 -0
  89. pygeai/_docs/source/pygeai.tests.core.utils.rst +21 -0
  90. pygeai/_docs/source/pygeai.tests.dbg.rst +21 -0
  91. pygeai/_docs/source/pygeai.tests.gam.rst +21 -0
  92. pygeai/_docs/source/pygeai.tests.health.rst +21 -0
  93. pygeai/_docs/source/pygeai.tests.integration.assistants.rag.rst +21 -0
  94. pygeai/_docs/source/pygeai.tests.integration.assistants.rst +18 -0
  95. pygeai/_docs/source/pygeai.tests.integration.chat.rst +21 -0
  96. pygeai/_docs/source/pygeai.tests.integration.lab.agents.rst +69 -0
  97. pygeai/_docs/source/pygeai.tests.integration.lab.processes.rst +69 -0
  98. pygeai/_docs/source/pygeai.tests.integration.lab.reasoning_strategies.rst +37 -0
  99. pygeai/_docs/source/pygeai.tests.integration.lab.rst +21 -0
  100. pygeai/_docs/source/pygeai.tests.integration.lab.tools.rst +77 -0
  101. pygeai/_docs/source/pygeai.tests.integration.rst +20 -0
  102. pygeai/_docs/source/pygeai.tests.lab.agents.rst +29 -0
  103. pygeai/_docs/source/pygeai.tests.lab.processes.rst +29 -0
  104. pygeai/_docs/source/pygeai.tests.lab.rst +49 -0
  105. pygeai/_docs/source/pygeai.tests.lab.spec.rst +29 -0
  106. pygeai/_docs/source/pygeai.tests.lab.strategies.rst +29 -0
  107. pygeai/_docs/source/pygeai.tests.lab.tools.rst +29 -0
  108. pygeai/_docs/source/pygeai.tests.migration.rst +29 -0
  109. pygeai/_docs/source/pygeai.tests.organization.limits.rst +29 -0
  110. pygeai/_docs/source/pygeai.tests.organization.rst +45 -0
  111. pygeai/_docs/source/pygeai.tests.proxy.rst +61 -0
  112. pygeai/_docs/source/pygeai.tests.rst +31 -0
  113. pygeai/_docs/source/pygeai.tests.snippets.assistants.data_analyst.rst +37 -0
  114. pygeai/_docs/source/pygeai.tests.snippets.assistants.rag.rst +85 -0
  115. pygeai/_docs/source/pygeai.tests.snippets.assistants.rst +78 -0
  116. pygeai/_docs/source/pygeai.tests.snippets.chat.rst +85 -0
  117. pygeai/_docs/source/pygeai.tests.snippets.embeddings.rst +21 -0
  118. pygeai/_docs/source/pygeai.tests.snippets.evaluation.rst +10 -0
  119. pygeai/_docs/source/pygeai.tests.snippets.extras.rst +37 -0
  120. pygeai/_docs/source/pygeai.tests.snippets.files.rst +53 -0
  121. pygeai/_docs/source/pygeai.tests.snippets.gam.rst +21 -0
  122. pygeai/_docs/source/pygeai.tests.snippets.lab.agents.rst +93 -0
  123. pygeai/_docs/source/pygeai.tests.snippets.lab.processes.jobs.rst +21 -0
  124. pygeai/_docs/source/pygeai.tests.snippets.lab.processes.kbs.rst +45 -0
  125. pygeai/_docs/source/pygeai.tests.snippets.lab.processes.rst +46 -0
  126. pygeai/_docs/source/pygeai.tests.snippets.lab.rst +82 -0
  127. pygeai/_docs/source/pygeai.tests.snippets.lab.samples.rst +21 -0
  128. pygeai/_docs/source/pygeai.tests.snippets.lab.strategies.rst +45 -0
  129. pygeai/_docs/source/pygeai.tests.snippets.lab.tools.rst +85 -0
  130. pygeai/_docs/source/pygeai.tests.snippets.lab.use_cases.rst +117 -0
  131. pygeai/_docs/source/pygeai.tests.snippets.migrate.rst +10 -0
  132. pygeai/_docs/source/pygeai.tests.snippets.organization.rst +69 -0
  133. pygeai/_docs/source/pygeai.tests.snippets.rag.rst +85 -0
  134. pygeai/_docs/source/pygeai.tests.snippets.rerank.rst +21 -0
  135. pygeai/_docs/source/pygeai.tests.snippets.rst +30 -0
  136. pygeai/_docs/source/pygeai.tests.snippets.secrets.rst +10 -0
  137. pygeai/_docs/source/pygeai.tests.snippets.usage_limit.rst +77 -0
  138. pygeai/cli/commands/base.py +9 -9
  139. pygeai/cli/commands/docs.py +2 -2
  140. {pygeai-0.6.0b3.dist-info → pygeai-0.6.0b6.dist-info}/METADATA +1 -1
  141. {pygeai-0.6.0b3.dist-info → pygeai-0.6.0b6.dist-info}/RECORD +145 -8
  142. {pygeai-0.6.0b3.dist-info → pygeai-0.6.0b6.dist-info}/WHEEL +0 -0
  143. {pygeai-0.6.0b3.dist-info → pygeai-0.6.0b6.dist-info}/entry_points.txt +0 -0
  144. {pygeai-0.6.0b3.dist-info → pygeai-0.6.0b6.dist-info}/licenses/LICENSE +0 -0
  145. {pygeai-0.6.0b3.dist-info → pygeai-0.6.0b6.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,552 @@
1
+ Project Management
2
+ ==================
3
+
4
+ The API Reference provides a comprehensive set of tools for managing projects within your organization. You can perform the following actions:
5
+ * Create project: Creates a new project within your organization.
6
+ * Get project data: Retrieves detailed information about a specific project using its Id.
7
+ * Delete project: Deletes an existing project.
8
+ * List projects: Retrieves a list of all projects within your organization. You can choose to retrieve a summary or detailed information for each project.
9
+ * Update project: Updates the name and description of an existing project.
10
+
11
+ List projects
12
+ ~~~~~~~~~~~~~~
13
+
14
+ Lists existing projects within an organization using `PyGEA </pygeai>`_. You can choose to display a summary or the full project information.
15
+
16
+ To achieve this, you have three options:
17
+
18
+ * `Command Line </docs/source/content/api_reference.rst#command-line>`_
19
+ * `Low-Level Service Layer </docs/source/content/api_reference.rst#low-level-service-layer>`_
20
+ * `High-Level Service Layer </docs/source/content/api_reference.rst#high-level-service-layer>`_
21
+
22
+
23
+ Command line
24
+ ^^^^^^^^^^^^
25
+
26
+ You can list projects using the following command-line options:
27
+
28
+
29
+ List projects with summary details (default)
30
+ ############################################
31
+
32
+ You can list the projects without additional options, as follows:
33
+
34
+ .. code-block:: shell
35
+
36
+ geai org list-projects
37
+
38
+
39
+ List projects with full details
40
+ ###############################
41
+
42
+ Use the optional flag "-d" to indicate "full" detail. The default is summary.
43
+
44
+ .. code-block:: shell
45
+
46
+ geai org list-projects -d full
47
+
48
+
49
+ If we need to work with a different API key, we can indicate an alias. Let's suppose we have an 'admin' alias with an
50
+ organization API key.
51
+
52
+ List projects using a different API token (alias)
53
+ #################################################
54
+
55
+ .. code-block:: shell
56
+
57
+ geai --alias <alias_name> org list-projects
58
+
59
+ Replace `<alias_name>` with the actual alias for your `GEAI_API_KEY` (e.g., "admin").
60
+
61
+ **Note**: Each alias defines a profile with a specific access level. Based on the profile's access level, you will need to use SAIA_ORGANIZATION_APITOKEN or SAIA_PROJECT_APITOKEN as GEAI_API_KEY.
62
+
63
+
64
+ Low level service layer
65
+ ^^^^^^^^^^^^^^^^^^^^^^^
66
+
67
+ Use the following code snippet to list projects with the desired detail level:
68
+
69
+ .. code-block:: python
70
+
71
+ from pygeai.organization.clients import OrganizationClient()
72
+
73
+ client = OrganizationClient()
74
+ project_list = client.get_project_list(detail="full") # Use "summary" for less detail
75
+ print(project_list)
76
+
77
+
78
+ High level service layer
79
+ ^^^^^^^^^^^^^^^^^^^^^^^^
80
+
81
+ Use the following code snippets to list projects using the high-level service layer:
82
+
83
+ List projects with default details
84
+ ##################################
85
+
86
+ You can get the list of projects by calling the "get_project_list" method from the OrganizationManager manager class.
87
+
88
+
89
+ .. code-block:: python
90
+
91
+ from pygeai.organization.managers import OrganizationManager
92
+
93
+ manager = OrganizationManager()
94
+
95
+ response = manager.get_project_list()
96
+ print(f"response: {response}")
97
+
98
+
99
+ List projects with full details and a specific alias
100
+ ####################################################
101
+
102
+ Also, you can indicate the alias for the desired environment to use.
103
+
104
+ .. code-block:: python
105
+
106
+ from pygeai.organization.managers import OrganizationManager
107
+
108
+ manager = OrganizationManager(alias="sdkorg")
109
+
110
+ response = manager.get_project_list("full")
111
+ print(f"response: {response}")
112
+
113
+
114
+
115
+ Create project
116
+ ~~~~~~~~~~~~~~
117
+
118
+ Creates a new project in `Globant Enterprise AI <https://wiki.genexus.com/enterprise-ai/wiki?8,Table+of+contents%3AEnterprise+AI>`_ using `PyGEA </pygeai>`_, providing the project name and the administrator's email address. Optionally, you can add a project description and set `usage limits <https://wiki.genexus.com/enterprise-ai/wiki?802,Usage+Limits+API#:~:text=Managing%20quotas%20per%20project>`_.
119
+
120
+ To achieve this, you have three options:
121
+
122
+ * `Command Line </docs/source/content/api_reference.rst#command-line>`_
123
+ * `Low-Level Service Layer </docs/source/content/api_reference.rst#low-level-service-layer>`_
124
+ * `High-Level Service Layer </docs/source/content/api_reference.rst#high-level-service-layer>`_
125
+
126
+ Command line
127
+ ^^^^^^^^^^^^
128
+
129
+ The simplest way to create a project is using the command line:
130
+
131
+ 1. Open your terminal or command prompt.
132
+ 2. Run the following command, replacing the placeholders with your desired values:
133
+
134
+ .. code-block:: shell
135
+
136
+ geai org create-project \
137
+ -n "Project Name" \
138
+ -e "admin@example.com" \
139
+ -d "Project Description"
140
+
141
+ Where:
142
+
143
+ - `n`: Name of your project.
144
+ - `e`: Email address of the project administrator.
145
+ - `d`: Optional description for your project.
146
+
147
+
148
+ Low level service layer
149
+ ^^^^^^^^^^^^^^^^^^^^^^^
150
+
151
+ For more control, you can use the low-level service layer. To do so:
152
+
153
+ 1. Import the necessary modules.
154
+ 2. Create an instance of the `OrganizationClient` class.
155
+ 3. Call the `create_project` method, providing the required information.
156
+
157
+ .. code-block:: python
158
+
159
+ from pygeai.organization.clients import OrganizationClient()
160
+
161
+ name="Project Name"
162
+ description="Project Description"
163
+ email="admin@example.com"
164
+
165
+ client = OrganizationClient()
166
+ new_project = client.create_project(name=name, email=email, description=description)
167
+ print(new_project)
168
+
169
+
170
+ High level service layer
171
+ ^^^^^^^^^^^^^^^^^^^^^^^^
172
+
173
+ The high-level service layer offers a more structured approach:
174
+
175
+ 1. Import the necessary modules.
176
+ 2. Create an instance of the `OrganizationManager` class.
177
+ 3. Define the project's usage limits (optional).
178
+ 4. Create a `Project` object with the necessary information.
179
+ 5. Call the `create_project` method of the `OrganizationManager` to create the project.
180
+
181
+ .. code-block:: python
182
+
183
+ from pygeai.organization.managers import OrganizationManager
184
+ from pygeai.core.models import ProjectUsageLimit, Project
185
+
186
+ manager = OrganizationManager()
187
+
188
+ usage_limit = ProjectUsageLimit(
189
+ subscription_type="Monthly", # Options: Freemium, Daily, Weekly, Monthly
190
+ usage_unit="Requests", # Options: Cost (Only Cost is allowed for organization limits)
191
+ soft_limit=500.0, # Recommended usage limit
192
+ hard_limit=1000.0, # Maximum allowed usage
193
+ renewal_status="Renewable" # Options: Renewable, NonRenewable
194
+ )
195
+
196
+ project = Project(
197
+ name="Project Name",
198
+ description="Project Description",
199
+ email="admin@example.com",
200
+ usage_limit=usage_limit
201
+ )
202
+
203
+
204
+ created_project = manager.create_project(project)
205
+
206
+
207
+ Update project
208
+ ~~~~~~~~~~~~~~
209
+
210
+ Updates an existing project in `Globant Enterprise AI <https://wiki.genexus.com/enterprise-ai/wiki?8,Table+of+contents%3AEnterprise+AI>`_ using `PyGEA </pygeai>`_. You can modify a project's name and description by providing its Id and updated information.
211
+
212
+ To update usage limits, refer to `Managing quotas per project <https://wiki.genexus.com/enterprise-ai/wiki?71,Managing+quotas+per+project>`_.
213
+
214
+ To achieve this, you have three options:
215
+
216
+ * `Command Line </docs/source/content/api_reference.rst#command-line>`_
217
+ * `Low-Level Service Layer </docs/source/content/api_reference.rst#low-level-service-layer>`_
218
+ * `High-Level Service Layer </docs/source/content/api_reference.rst#high-level-service-layer>`_
219
+
220
+ Command line
221
+ ^^^^^^^^^^^^
222
+
223
+ Use the following command to update a project:
224
+
225
+
226
+ .. code-block:: shell
227
+
228
+ geai org update-project \
229
+ -id <project_id> \
230
+ --name "<new_project_name>" \
231
+ --description "<new_project_description>"
232
+
233
+ Replace the placeholders with the actual values:
234
+
235
+ * `<project_id>`: Id of the project you want to update.
236
+ * `<new_project_name>`: New name for the project.
237
+ * `<new_project_description>`: New description for the project.
238
+
239
+ For example:
240
+
241
+ .. code-block:: shell
242
+ geai org update-project \
243
+ --id 12345678-90ab-cdef-1234-567890abcdef \
244
+ --name "Updated Project Name" \
245
+ --description "This is the updated project description"
246
+
247
+
248
+ Low level service layer
249
+ ^^^^^^^^^^^^^^^^^^^^^^^
250
+
251
+ Use the following code snippet to update a project using the low-level service layer:
252
+
253
+
254
+ .. code-block:: python
255
+
256
+ from pygeai.organization.clients import OrganizationClient()
257
+
258
+ project_id="<project_id>"
259
+ name="<new_project_name>"
260
+ description="<new_project_description>"
261
+
262
+ client = OrganizationClient()
263
+ new_project = client.update_project(
264
+ project_id=project_id,
265
+ name=name,
266
+ description=description
267
+ )
268
+ print(new_project)
269
+
270
+ Replace the placeholders with the actual values for your project.
271
+
272
+
273
+ High level service layer
274
+ ^^^^^^^^^^^^^^^^^^^^^^^^
275
+
276
+ Use the following code snippet to update a project using the high-level service layer:
277
+
278
+
279
+ .. code-block:: python
280
+
281
+ from pygeai.organization.managers import OrganizationManager
282
+ from pygeai.core.models import UsageLimit, Project
283
+
284
+ client = OrganizationManager()
285
+
286
+ project = Project(
287
+ d="<project_id>",
288
+ name="<new_project_name>",
289
+ description="<new_project_description>",
290
+ )
291
+
292
+
293
+ project = client.update_project(project)
294
+ print(f"project: {project}")
295
+
296
+
297
+ Replace the placeholders with the actual values for your project.
298
+
299
+
300
+ Delete project
301
+ ~~~~~~~~~~~~~~
302
+
303
+ Deletes an existing project in `Globant Enterprise AI <https://wiki.genexus.com/enterprise-ai/wiki?8,Table+of+contents%3AEnterprise+AI>`_ using `PyGEA </pygeai>`_. You can delete a project by providing its project Id.
304
+
305
+ A successful deletion results in an empty response. If the project doesn't exist or if you lack the necessary permissions, an error occurs.
306
+
307
+ To delete a project, you have three options:
308
+
309
+ * `Command Line </docs/source/content/api_reference.rst#command-line>`_
310
+ * `Low-Level Service Layer </docs/source/content/api_reference.rst#low-level-service-layer>`_
311
+ * `High-Level Service Layer </docs/source/content/api_reference.rst#high-level-service-layer>`_
312
+
313
+ Command line
314
+ ^^^^^^^^^^^^
315
+
316
+ Use the following command to delete a project:
317
+
318
+ .. code-block:: shell
319
+
320
+ geai org delete-project \
321
+ --id <project_id>
322
+
323
+ Replace <`project_id`> with the actual project Id. For example:
324
+
325
+ .. code-block:: shell
326
+ geai org delete-project \
327
+ --id 12345678-90ab-cdef-1234-567890abcdef
328
+
329
+
330
+ Low level service layer
331
+ ^^^^^^^^^^^^^^^^^^^^^^^
332
+
333
+ Use the following code snippet to delete a project using the low-level service layer:
334
+
335
+
336
+ .. code-block:: python
337
+
338
+ from pygeai.organization.clients import OrganizationClient()
339
+
340
+ project_id = "<project_id>"
341
+ client = OrganizationClient()
342
+ deleted_project = client.delete_project(project_id=project_id)
343
+ print(deleted_project)
344
+
345
+ Replace <`project_id`> with the actual project Id. For example:
346
+
347
+ .. code-block:: python
348
+
349
+ from pygeai.organization.clients import OrganizationClient()
350
+
351
+ project_id="12345678-90ab-cdef-1234-567890abcdef"
352
+ client = OrganizationClient()
353
+ deleted_project = client.delete_project(
354
+
355
+ High level service layer
356
+ ^^^^^^^^^^^^^^^^^^^^^^^^
357
+
358
+ Use the following code snippet to delete a project using the high-level service layer:
359
+
360
+ .. code-block:: python
361
+
362
+ from pygeai.organization.managers import OrganizationManager
363
+
364
+ manager = OrganizationManager()
365
+
366
+ response = manager.delete_project("<project_id>")
367
+ print(f"response: {response}")
368
+
369
+ Replace <`project_id`> with the actual project Id. For example:
370
+
371
+ .. code-block:: python
372
+
373
+ from pygeai.core.managers import OrganizationManager
374
+
375
+ manager = OrganizationManager()
376
+ response = manager.delete_project("12345678-90ab-cdef-1234-567890abcdef")
377
+ print(f"response: {response}")
378
+
379
+
380
+ Get project data
381
+ ~~~~~~~~~~~~~~~~
382
+
383
+ Retrieves project data using `PyGEA </pygeai>`_. You can fetch project details by providing the project Id.
384
+
385
+ To achieve this, you have three options:
386
+
387
+ * `Command Line </docs/source/content/api_reference.rst#command-line>`_
388
+ * `Low-Level Service Layer </docs/source/content/api_reference.rst#low-level-service-layer>`_
389
+ * `High-Level Service Layer </docs/source/content/api_reference.rst#high-level-service-layer>`_
390
+
391
+
392
+ Command line
393
+ ^^^^^^^^^^^^
394
+
395
+ Use the following command to retrieve the project:
396
+
397
+ .. code-block:: shell
398
+
399
+ geai org get-project \
400
+ --id <project_id>
401
+
402
+ Replace `<project_id>` with the actual project Id. For example:
403
+
404
+ .. code-block:: shell
405
+
406
+ geai org get-project \
407
+ --id 12345678-90ab-cdef-1234-567890abcdef
408
+
409
+
410
+ Low level service layer
411
+ ^^^^^^^^^^^^^^^^^^^^^^^
412
+
413
+ Use the following code snippet to retrieve project data using the low-level service layer:
414
+
415
+
416
+ .. code-block:: python
417
+
418
+ from pygeai.organization.clients import OrganizationClient()
419
+
420
+ project_id="<project_id>"
421
+ client = OrganizationClient()
422
+ project_data = client.get_project_data(project_id=project_id)
423
+ print(project_data)
424
+
425
+ Replace `<project_id>` with the actual project Id. For example:
426
+
427
+
428
+ .. code-block:: python
429
+
430
+ from pygeai.organization.clients import OrganizationClient()
431
+
432
+ project_id="12345678-90ab-cdef-1234-567890abcdef"
433
+ client = OrganizationClient()
434
+ project_data = client.get_project_data(project_id=project_id)
435
+ print(project_data)
436
+
437
+
438
+ High level service layer
439
+ ^^^^^^^^^^^^^^^^^^^^^^^^
440
+
441
+ Use the following code snippet to retrieve project data using the high-level service layer:
442
+
443
+
444
+ .. code-block:: python
445
+
446
+ from pygeai.organization.managers import OrganizationManager
447
+
448
+ manager = OrganizationManager(alias="sdkorg")
449
+
450
+ project = manager.get_project_data(project_id="<project_id>")
451
+ print(f"project: {project}")
452
+
453
+
454
+ Replace `<project_id>` with the actual project Id. For example:
455
+
456
+ .. code-block:: python
457
+
458
+ from pygeai.core.managers import OrganizationManager
459
+
460
+ manager = OrganizationManager(alias="sdkorg")
461
+ project = manager.get_project_data(project_id="12345678-90ab-cdef-1234-567890abcdef")
462
+ print(f"project: {project}")
463
+
464
+
465
+ Token Management
466
+ ================
467
+ You can manage project tokens, which are essential for authentication and authorization when interacting with specific projects.
468
+
469
+ * Get Project Tokens: Retrieves the tokens associated with a specific project.
470
+
471
+ Get Project Tokens
472
+ ~~~~~~~~~~~~~~~~~~
473
+
474
+ Retrieves the tokens associated with a specific project using PyGEA. You can fetch these tokens by providing the project Id.
475
+
476
+ To achieve this, you have three options:
477
+
478
+ * `Command Line </docs/source/content/api_reference.rst#command-line>`_
479
+ * `Low-Level Service Layer </docs/source/content/api_reference.rst#low-level-service-layer>`_
480
+ * `High-Level Service Layer </docs/source/content/api_reference.rst#high-level-service-layer>`_
481
+
482
+ Command line
483
+ ^^^^^^^^^^^^
484
+
485
+ Use the following command to retrieve project tokens:
486
+
487
+ .. code-block:: shell
488
+ geai org get-tokens --id <project_id>
489
+
490
+ Replace `<project_id>` with the actual project Id. For example:
491
+
492
+ .. code-block:: shell
493
+ geai org get-tokens --id 12345678-90ab-cdef-1234-567890abcdef
494
+
495
+
496
+ Low level service layer
497
+ ^^^^^^^^^^^^^^^^^^^^^^^
498
+
499
+ Use the following code snippet to retrieve project tokens using the low-level service layer:
500
+
501
+
502
+ .. code-block:: python
503
+
504
+ from pygeai.organization.clients import OrganizationClient
505
+
506
+ project_id = "<project_id>"
507
+
508
+ client = OrganizationClient()
509
+ tokens = client.get_project_tokens(project_id=project_id)
510
+ print(tokens)
511
+
512
+ Replace `<project_id>` with the actual project Id. For example:
513
+
514
+ .. code-block:: python
515
+
516
+ from pygeai.organization.clients import OrganizationClient
517
+
518
+ project_id = "12345678-90ab-cdef-1234-567890abcdef"
519
+
520
+ client = OrganizationClient()
521
+ tokens = client.get_project_tokens(project_id=project_id)
522
+ print(tokens)
523
+
524
+ High level service layer
525
+ ^^^^^^^^^^^^^^^^^^^^^^^^
526
+
527
+ Use the following code snippet to retrieve project tokens using the high-level service layer:
528
+
529
+ .. code-block:: python
530
+
531
+ from pygeai.core.managers import OrganizationManager
532
+ from pygeai.core.base.models import ProjectTokensResponse
533
+
534
+ client = OrganizationManager()
535
+ project_id = "<project_id>"
536
+
537
+ tokens: ProjectTokensResponse = client.get_project_tokens(project_id=project_id)
538
+ print(f"tokens: {tokens}")
539
+
540
+ Replace `<project_id>` with the actual project Id. For example:
541
+
542
+ .. code-block:: python
543
+
544
+ from pygeai.organization.managers import OrganizationManager
545
+ from pygeai.core.models import ProjectTokensResponse
546
+
547
+ client = OrganizationManager()
548
+
549
+ project_id = "12345678-90ab-cdef-1234-567890abcdef"
550
+
551
+ tokens: ProjectTokensResponse = client.get_project_tokens(project_id=project_id)
552
+ print(f"tokens: {tokens}")