uipath 1.1.1__tar.gz → 2.0.0.dev2__tar.gz
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 uipath might be problematic. Click here for more details.
- uipath-2.0.0.dev2/.gitignore +19 -0
- uipath-2.0.0.dev2/PKG-INFO +198 -0
- uipath-2.0.0.dev2/README.md +170 -0
- uipath-2.0.0.dev2/pyproject.toml +113 -0
- uipath-2.0.0.dev2/uipath/__init__.py +24 -0
- uipath-2.0.0.dev2/uipath/_cli/README.md +11 -0
- uipath-2.0.0.dev2/uipath/_cli/__init__.py +54 -0
- uipath-2.0.0.dev2/uipath/_cli/_auth/_auth_server.py +165 -0
- uipath-2.0.0.dev2/uipath/_cli/_auth/_models.py +51 -0
- uipath-2.0.0.dev2/uipath/_cli/_auth/_oidc_utils.py +69 -0
- uipath-2.0.0.dev2/uipath/_cli/_auth/_portal_service.py +163 -0
- uipath-2.0.0.dev2/uipath/_cli/_auth/_utils.py +51 -0
- uipath-2.0.0.dev2/uipath/_cli/_auth/auth_config.json +6 -0
- uipath-2.0.0.dev2/uipath/_cli/_auth/index.html +167 -0
- uipath-2.0.0.dev2/uipath/_cli/_auth/localhost.crt +25 -0
- uipath-2.0.0.dev2/uipath/_cli/_auth/localhost.key +27 -0
- uipath-2.0.0.dev2/uipath/_cli/_runtime/_contracts.py +429 -0
- uipath-2.0.0.dev2/uipath/_cli/_runtime/_logging.py +193 -0
- uipath-2.0.0.dev2/uipath/_cli/_runtime/_runtime.py +264 -0
- uipath-2.0.0.dev2/uipath/_cli/_templates/.psmdcp.template +9 -0
- uipath-2.0.0.dev2/uipath/_cli/_templates/.rels.template +5 -0
- uipath-2.0.0.dev2/uipath/_cli/_templates/[Content_Types].xml.template +9 -0
- uipath-2.0.0.dev2/uipath/_cli/_templates/main.py.template +25 -0
- uipath-2.0.0.dev2/uipath/_cli/_templates/package.nuspec.template +10 -0
- uipath-2.0.0.dev2/uipath/_cli/_utils/_common.py +24 -0
- uipath-2.0.0.dev2/uipath/_cli/_utils/_input_args.py +126 -0
- uipath-2.0.0.dev2/uipath/_cli/_utils/_parse_ast.py +542 -0
- uipath-2.0.0.dev2/uipath/_cli/cli_auth.py +97 -0
- uipath-2.0.0.dev2/uipath/_cli/cli_deploy.py +13 -0
- uipath-2.0.0.dev2/uipath/_cli/cli_init.py +113 -0
- uipath-2.0.0.dev2/uipath/_cli/cli_new.py +76 -0
- uipath-2.0.0.dev2/uipath/_cli/cli_pack.py +337 -0
- uipath-2.0.0.dev2/uipath/_cli/cli_publish.py +113 -0
- uipath-2.0.0.dev2/uipath/_cli/cli_run.py +133 -0
- uipath-2.0.0.dev2/uipath/_cli/middlewares.py +113 -0
- uipath-2.0.0.dev2/uipath/_config.py +6 -0
- uipath-2.0.0.dev2/uipath/_execution_context.py +83 -0
- uipath-2.0.0.dev2/uipath/_folder_context.py +62 -0
- uipath-2.0.0.dev2/uipath/_models/__init__.py +35 -0
- uipath-2.0.0.dev2/uipath/_models/action_schema.py +26 -0
- uipath-2.0.0.dev2/uipath/_models/actions.py +64 -0
- uipath-2.0.0.dev2/uipath/_models/assets.py +48 -0
- uipath-2.0.0.dev2/uipath/_models/connections.py +51 -0
- uipath-2.0.0.dev2/uipath/_models/context_grounding.py +18 -0
- uipath-2.0.0.dev2/uipath/_models/interrupt_models.py +28 -0
- uipath-2.0.0.dev2/uipath/_models/job.py +66 -0
- uipath-2.0.0.dev2/uipath/_models/llm_gateway.py +101 -0
- uipath-2.0.0.dev2/uipath/_models/processes.py +48 -0
- uipath-2.0.0.dev2/uipath/_models/queues.py +167 -0
- uipath-2.0.0.dev2/uipath/_services/__init__.py +24 -0
- uipath-2.0.0.dev2/uipath/_services/_base_service.py +250 -0
- uipath-2.0.0.dev2/uipath/_services/actions_service.py +271 -0
- uipath-2.0.0.dev2/uipath/_services/api_client.py +89 -0
- uipath-2.0.0.dev2/uipath/_services/assets_service.py +257 -0
- uipath-2.0.0.dev2/uipath/_services/buckets_service.py +205 -0
- uipath-2.0.0.dev2/uipath/_services/connections_service.py +185 -0
- uipath-2.0.0.dev2/uipath/_services/connections_service.pyi +50 -0
- uipath-2.0.0.dev2/uipath/_services/context_grounding_service.py +218 -0
- uipath-2.0.0.dev2/uipath/_services/jobs_service.py +265 -0
- uipath-2.0.0.dev2/uipath/_services/llm_gateway_service.py +311 -0
- uipath-2.0.0.dev2/uipath/_services/processes_service.py +168 -0
- uipath-2.0.0.dev2/uipath/_services/queues_service.py +314 -0
- uipath-2.0.0.dev2/uipath/_uipath.py +86 -0
- uipath-2.0.0.dev2/uipath/_utils/__init__.py +17 -0
- uipath-2.0.0.dev2/uipath/_utils/_endpoint.py +79 -0
- uipath-2.0.0.dev2/uipath/_utils/_infer_bindings.py +30 -0
- uipath-2.0.0.dev2/uipath/_utils/_logs.py +15 -0
- uipath-2.0.0.dev2/uipath/_utils/_request_override.py +18 -0
- uipath-2.0.0.dev2/uipath/_utils/_request_spec.py +23 -0
- uipath-2.0.0.dev2/uipath/_utils/_user_agent.py +16 -0
- uipath-2.0.0.dev2/uipath/_utils/constants.py +20 -0
- uipath-2.0.0.dev2/uipath/py.typed +0 -0
- uipath-1.1.1/.github/workflows/docs.yml +0 -29
- uipath-1.1.1/.github/workflows/publish.yml +0 -27
- uipath-1.1.1/.gitignore +0 -47
- uipath-1.1.1/LICENSE +0 -21
- uipath-1.1.1/PKG-INFO +0 -177
- uipath-1.1.1/README.md +0 -138
- uipath-1.1.1/docs/index.md +0 -422
- uipath-1.1.1/docs/requirements.txt +0 -3
- uipath-1.1.1/docs/resources/alerts.md +0 -265
- uipath-1.1.1/docs/resources/assets.md +0 -247
- uipath-1.1.1/docs/resources/audit.md +0 -278
- uipath-1.1.1/docs/resources/directory.md +0 -285
- uipath-1.1.1/docs/resources/environments.md +0 -292
- uipath-1.1.1/docs/resources/folders.md +0 -294
- uipath-1.1.1/docs/resources/jobs.md +0 -82
- uipath-1.1.1/docs/resources/libraries.md +0 -288
- uipath-1.1.1/docs/resources/licensing.md +0 -273
- uipath-1.1.1/docs/resources/logs.md +0 -206
- uipath-1.1.1/docs/resources/machines.md +0 -297
- uipath-1.1.1/docs/resources/metrics.md +0 -248
- uipath-1.1.1/docs/resources/packages.md +0 -306
- uipath-1.1.1/docs/resources/processes.md +0 -278
- uipath-1.1.1/docs/resources/queues/test_data_queue.md +0 -5
- uipath-1.1.1/docs/resources/queues.md +0 -155
- uipath-1.1.1/docs/resources/releases.md +0 -285
- uipath-1.1.1/docs/resources/robots.md +0 -201
- uipath-1.1.1/docs/resources/schedules.md +0 -253
- uipath-1.1.1/docs/resources/settings/maintenance.md +0 -5
- uipath-1.1.1/docs/resources/settings.md +0 -283
- uipath-1.1.1/docs/resources/stats.md +0 -258
- uipath-1.1.1/docs/resources/status.md +0 -251
- uipath-1.1.1/docs/resources/task_forms.md +0 -278
- uipath-1.1.1/docs/resources/webhooks.md +0 -267
- uipath-1.1.1/mkdocs.yml +0 -80
- uipath-1.1.1/pyproject.toml +0 -25
- uipath-1.1.1/requirements.txt +0 -1
- uipath-1.1.1/setup.cfg +0 -4
- uipath-1.1.1/setup.py +0 -41
- uipath-1.1.1/uipath/__init__.py +0 -9
- uipath-1.1.1/uipath/__version__.py +0 -3
- uipath-1.1.1/uipath/auth/authentication.py +0 -53
- uipath-1.1.1/uipath/client/api_client.py +0 -89
- uipath-1.1.1/uipath/client/base_client.py +0 -46
- uipath-1.1.1/uipath/client/resources/__init__.py +0 -5
- uipath-1.1.1/uipath/client/resources/alerts.py +0 -65
- uipath-1.1.1/uipath/client/resources/assets.py +0 -29
- uipath-1.1.1/uipath/client/resources/audit.py +0 -83
- uipath-1.1.1/uipath/client/resources/directory.py +0 -99
- uipath-1.1.1/uipath/client/resources/environments.py +0 -62
- uipath-1.1.1/uipath/client/resources/folders.py +0 -147
- uipath-1.1.1/uipath/client/resources/jobs.py +0 -113
- uipath-1.1.1/uipath/client/resources/libraries.py +0 -120
- uipath-1.1.1/uipath/client/resources/licensing.py +0 -40
- uipath-1.1.1/uipath/client/resources/logs.py +0 -46
- uipath-1.1.1/uipath/client/resources/machines.py +0 -136
- uipath-1.1.1/uipath/client/resources/maintenance.py +0 -85
- uipath-1.1.1/uipath/client/resources/metrics.py +0 -38
- uipath-1.1.1/uipath/client/resources/packages.py +0 -112
- uipath-1.1.1/uipath/client/resources/processes.py +0 -173
- uipath-1.1.1/uipath/client/resources/queues.py +0 -90
- uipath-1.1.1/uipath/client/resources/releases.py +0 -114
- uipath-1.1.1/uipath/client/resources/robots.py +0 -155
- uipath-1.1.1/uipath/client/resources/settings.py +0 -99
- uipath-1.1.1/uipath/client/resources/stats.py +0 -89
- uipath-1.1.1/uipath/client/resources/status.py +0 -31
- uipath-1.1.1/uipath/client/resources/task_forms.py +0 -153
- uipath-1.1.1/uipath/client/resources/test_automation.py +0 -119
- uipath-1.1.1/uipath/client/resources/test_data_queue.py +0 -64
- uipath-1.1.1/uipath/client/resources/users.py +0 -91
- uipath-1.1.1/uipath/client/resources/webhooks.py +0 -98
- uipath-1.1.1/uipath.egg-info/PKG-INFO +0 -177
- uipath-1.1.1/uipath.egg-info/SOURCES.txt +0 -73
- uipath-1.1.1/uipath.egg-info/dependency_links.txt +0 -1
- uipath-1.1.1/uipath.egg-info/requires.txt +0 -6
- uipath-1.1.1/uipath.egg-info/top_level.txt +0 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Python-generated files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[oc]
|
|
4
|
+
build/
|
|
5
|
+
dist/
|
|
6
|
+
wheels/
|
|
7
|
+
*.egg-info
|
|
8
|
+
|
|
9
|
+
# Virtual environments
|
|
10
|
+
.venv
|
|
11
|
+
**/.env
|
|
12
|
+
**/uipath.db
|
|
13
|
+
**/.uipath
|
|
14
|
+
**/**.nupkg
|
|
15
|
+
**/uipath.json
|
|
16
|
+
**/__uipath/
|
|
17
|
+
|
|
18
|
+
**/playground.py
|
|
19
|
+
**/.idea
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: uipath
|
|
3
|
+
Version: 2.0.0.dev2
|
|
4
|
+
Summary: Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools.
|
|
5
|
+
Project-URL: Homepage, https://uipath.com
|
|
6
|
+
Project-URL: Repository, https://github.com/UiPath/uipath-python
|
|
7
|
+
Maintainer-email: Marius Cosareanu <marius.cosareanu@uipath.com>, Cristian Pufu <cristian.pufu@uipath.com>
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
15
|
+
Requires-Python: >=3.9
|
|
16
|
+
Requires-Dist: click>=8.1.8
|
|
17
|
+
Requires-Dist: httpx>=0.28.1
|
|
18
|
+
Requires-Dist: pydantic>=2.11.1
|
|
19
|
+
Requires-Dist: pytest-asyncio>=0.25.3
|
|
20
|
+
Requires-Dist: python-dotenv>=1.0.1
|
|
21
|
+
Requires-Dist: requests>=2.32.3
|
|
22
|
+
Requires-Dist: tenacity>=9.0.0
|
|
23
|
+
Requires-Dist: tomli>=2.2.1
|
|
24
|
+
Requires-Dist: types-requests>=2.32.0.20250306
|
|
25
|
+
Provides-Extra: langchain
|
|
26
|
+
Requires-Dist: uipath-langchain==0.0.85; extra == 'langchain'
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
|
|
29
|
+
# UiPath Python SDK
|
|
30
|
+
|
|
31
|
+
[](https://pypi.org/project/uipath/)
|
|
32
|
+
[](https://img.shields.io/pypi/v/uipath)
|
|
33
|
+
[](https://pypi.org/project/uipath/)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
A Python SDK that enables programmatic interaction with UiPath Platform services including processes, assets, buckets, context grounding, data services, jobs, and more. The package also features a CLI for creation, packaging, and deployment of automations to UiPath Platform.
|
|
37
|
+
|
|
38
|
+
## Table of Contents
|
|
39
|
+
|
|
40
|
+
- [Installation](#installation)
|
|
41
|
+
- [Configuration](#configuration)
|
|
42
|
+
- [Environment Variables](#environment-variables)
|
|
43
|
+
- [Basic Usage](#basic-usage)
|
|
44
|
+
- [Available Services](#available-services)
|
|
45
|
+
- [Examples](#examples)
|
|
46
|
+
- [Buckets Service](#buckets-service)
|
|
47
|
+
- [Context Grounding Service](#context-grounding-service)
|
|
48
|
+
- [Command Line Interface (CLI)](#command-line-interface-cli)
|
|
49
|
+
- [Authentication](#authentication)
|
|
50
|
+
- [Initialize a Project](#initialize-a-project)
|
|
51
|
+
- [Debug a Project](#debug-a-project)
|
|
52
|
+
- [Package a Project](#package-a-project)
|
|
53
|
+
- [Publish a Package](#publish-a-package)
|
|
54
|
+
- [Project Structure](#project-structure)
|
|
55
|
+
- [Development](#development)
|
|
56
|
+
- [Setting Up a Development Environment](#setting-up-a-development-environment)
|
|
57
|
+
|
|
58
|
+
## Installation
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
pip install uipath
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
using `uv`:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
uv add uipath
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Configuration
|
|
71
|
+
|
|
72
|
+
### Environment Variables
|
|
73
|
+
|
|
74
|
+
Create a `.env` file in your project root with the following variables:
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
UIPATH_URL=https://cloud.uipath.com/ACCOUNT_NAME/TENANT_NAME
|
|
78
|
+
UIPATH_ACCESS_TOKEN=YOUR_TOKEN_HERE
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Basic Usage
|
|
82
|
+
|
|
83
|
+
```python
|
|
84
|
+
from uipath import UiPath
|
|
85
|
+
# Initialize the SDK
|
|
86
|
+
sdk = UiPath()
|
|
87
|
+
# Execute a process
|
|
88
|
+
job = sdk.processes.invoke(
|
|
89
|
+
name="MyProcess",
|
|
90
|
+
input_arguments={"param1": "value1", "param2": 42}
|
|
91
|
+
)
|
|
92
|
+
# Work with assets
|
|
93
|
+
asset = sdk.assets.retrieve(name="MyAsset")
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Available Services
|
|
97
|
+
|
|
98
|
+
The SDK provides access to various UiPath services:
|
|
99
|
+
- `sdk.processes` - Manage and execute UiPath automation processes
|
|
100
|
+
- `sdk.assets` - Work with assets (variables, credentials) stored in UiPath
|
|
101
|
+
- `sdk.buckets` - Manage cloud storage containers for automation files
|
|
102
|
+
- `sdk.connections` - Handle connections to external systems
|
|
103
|
+
- `sdk.context_grounding` - Work with semantic contexts for AI-enabled automation
|
|
104
|
+
- `sdk.jobs` - Monitor and manage automation jobs
|
|
105
|
+
- `sdk.queues` - Work with transaction queues
|
|
106
|
+
- `sdk.actions` - Work with Action Center
|
|
107
|
+
- `sdk.api_client` - Direct access to the API client for custom requests
|
|
108
|
+
|
|
109
|
+
## Examples
|
|
110
|
+
|
|
111
|
+
### Buckets Service
|
|
112
|
+
|
|
113
|
+
```python
|
|
114
|
+
# Download a file from a bucket
|
|
115
|
+
sdk.buckets.download(
|
|
116
|
+
bucket_key="my-bucket",
|
|
117
|
+
blob_file_path="path/to/file.xlsx",
|
|
118
|
+
destination_path="local/path/file.xlsx"
|
|
119
|
+
)
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Context Grounding Service
|
|
123
|
+
|
|
124
|
+
```python
|
|
125
|
+
# Search for contextual information
|
|
126
|
+
results = sdk.context_grounding.search(
|
|
127
|
+
name="my-knowledge-index",
|
|
128
|
+
query="How do I process an invoice?",
|
|
129
|
+
number_of_results=5
|
|
130
|
+
)
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Command Line Interface (CLI)
|
|
134
|
+
|
|
135
|
+
The SDK also provides a command-line interface for creating, packaging, and deploying automations:
|
|
136
|
+
|
|
137
|
+
### Authentication
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
uipath auth
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
This command opens a browser for authentication and creates/updates your `.env` file with the proper credentials.
|
|
144
|
+
|
|
145
|
+
### Initialize a Project
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
uipath init [ENTRYPOINT]
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Creates a `uipath.json` configuration file for your project. If the entrypoint is not provided, it will try to find a single Python file in the current directory.
|
|
152
|
+
|
|
153
|
+
### Debug a Project
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
uipath run ENTRYPOINT [INPUT]
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Executes a Python script with the provided JSON input arguments.
|
|
160
|
+
|
|
161
|
+
### Package a Project
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
uipath pack
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Packages your project into a `.nupkg` file that can be deployed to UiPath.
|
|
168
|
+
|
|
169
|
+
**Note:** Your `pyproject.toml` must include:
|
|
170
|
+
- A description field (avoid characters: &, <, >, ", ', ;)
|
|
171
|
+
- Author information
|
|
172
|
+
|
|
173
|
+
Example:
|
|
174
|
+
```toml
|
|
175
|
+
description = "Your package description"
|
|
176
|
+
authors = [{name = "Your Name", email = "your.email@example.com"}]
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### Publish a Package
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
uipath publish
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
Publishes the most recently created package to your UiPath Orchestrator.
|
|
186
|
+
|
|
187
|
+
## Project Structure
|
|
188
|
+
|
|
189
|
+
To properly use the CLI for packaging and publishing, your project should include:
|
|
190
|
+
- A `pyproject.toml` file with project metadata
|
|
191
|
+
- A `uipath.json` file (generated by `uipath init`)
|
|
192
|
+
- Any Python files needed for your automation
|
|
193
|
+
|
|
194
|
+
## Development
|
|
195
|
+
|
|
196
|
+
### Setting Up a Development Environment
|
|
197
|
+
|
|
198
|
+
Please read our [contribution guidelines](CONTRIBUTING.md) before submitting a pull request.
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# UiPath Python SDK
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/uipath/)
|
|
4
|
+
[](https://img.shields.io/pypi/v/uipath)
|
|
5
|
+
[](https://pypi.org/project/uipath/)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
A Python SDK that enables programmatic interaction with UiPath Platform services including processes, assets, buckets, context grounding, data services, jobs, and more. The package also features a CLI for creation, packaging, and deployment of automations to UiPath Platform.
|
|
9
|
+
|
|
10
|
+
## Table of Contents
|
|
11
|
+
|
|
12
|
+
- [Installation](#installation)
|
|
13
|
+
- [Configuration](#configuration)
|
|
14
|
+
- [Environment Variables](#environment-variables)
|
|
15
|
+
- [Basic Usage](#basic-usage)
|
|
16
|
+
- [Available Services](#available-services)
|
|
17
|
+
- [Examples](#examples)
|
|
18
|
+
- [Buckets Service](#buckets-service)
|
|
19
|
+
- [Context Grounding Service](#context-grounding-service)
|
|
20
|
+
- [Command Line Interface (CLI)](#command-line-interface-cli)
|
|
21
|
+
- [Authentication](#authentication)
|
|
22
|
+
- [Initialize a Project](#initialize-a-project)
|
|
23
|
+
- [Debug a Project](#debug-a-project)
|
|
24
|
+
- [Package a Project](#package-a-project)
|
|
25
|
+
- [Publish a Package](#publish-a-package)
|
|
26
|
+
- [Project Structure](#project-structure)
|
|
27
|
+
- [Development](#development)
|
|
28
|
+
- [Setting Up a Development Environment](#setting-up-a-development-environment)
|
|
29
|
+
|
|
30
|
+
## Installation
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pip install uipath
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
using `uv`:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
uv add uipath
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Configuration
|
|
43
|
+
|
|
44
|
+
### Environment Variables
|
|
45
|
+
|
|
46
|
+
Create a `.env` file in your project root with the following variables:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
UIPATH_URL=https://cloud.uipath.com/ACCOUNT_NAME/TENANT_NAME
|
|
50
|
+
UIPATH_ACCESS_TOKEN=YOUR_TOKEN_HERE
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Basic Usage
|
|
54
|
+
|
|
55
|
+
```python
|
|
56
|
+
from uipath import UiPath
|
|
57
|
+
# Initialize the SDK
|
|
58
|
+
sdk = UiPath()
|
|
59
|
+
# Execute a process
|
|
60
|
+
job = sdk.processes.invoke(
|
|
61
|
+
name="MyProcess",
|
|
62
|
+
input_arguments={"param1": "value1", "param2": 42}
|
|
63
|
+
)
|
|
64
|
+
# Work with assets
|
|
65
|
+
asset = sdk.assets.retrieve(name="MyAsset")
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Available Services
|
|
69
|
+
|
|
70
|
+
The SDK provides access to various UiPath services:
|
|
71
|
+
- `sdk.processes` - Manage and execute UiPath automation processes
|
|
72
|
+
- `sdk.assets` - Work with assets (variables, credentials) stored in UiPath
|
|
73
|
+
- `sdk.buckets` - Manage cloud storage containers for automation files
|
|
74
|
+
- `sdk.connections` - Handle connections to external systems
|
|
75
|
+
- `sdk.context_grounding` - Work with semantic contexts for AI-enabled automation
|
|
76
|
+
- `sdk.jobs` - Monitor and manage automation jobs
|
|
77
|
+
- `sdk.queues` - Work with transaction queues
|
|
78
|
+
- `sdk.actions` - Work with Action Center
|
|
79
|
+
- `sdk.api_client` - Direct access to the API client for custom requests
|
|
80
|
+
|
|
81
|
+
## Examples
|
|
82
|
+
|
|
83
|
+
### Buckets Service
|
|
84
|
+
|
|
85
|
+
```python
|
|
86
|
+
# Download a file from a bucket
|
|
87
|
+
sdk.buckets.download(
|
|
88
|
+
bucket_key="my-bucket",
|
|
89
|
+
blob_file_path="path/to/file.xlsx",
|
|
90
|
+
destination_path="local/path/file.xlsx"
|
|
91
|
+
)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Context Grounding Service
|
|
95
|
+
|
|
96
|
+
```python
|
|
97
|
+
# Search for contextual information
|
|
98
|
+
results = sdk.context_grounding.search(
|
|
99
|
+
name="my-knowledge-index",
|
|
100
|
+
query="How do I process an invoice?",
|
|
101
|
+
number_of_results=5
|
|
102
|
+
)
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Command Line Interface (CLI)
|
|
106
|
+
|
|
107
|
+
The SDK also provides a command-line interface for creating, packaging, and deploying automations:
|
|
108
|
+
|
|
109
|
+
### Authentication
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
uipath auth
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
This command opens a browser for authentication and creates/updates your `.env` file with the proper credentials.
|
|
116
|
+
|
|
117
|
+
### Initialize a Project
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
uipath init [ENTRYPOINT]
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Creates a `uipath.json` configuration file for your project. If the entrypoint is not provided, it will try to find a single Python file in the current directory.
|
|
124
|
+
|
|
125
|
+
### Debug a Project
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
uipath run ENTRYPOINT [INPUT]
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Executes a Python script with the provided JSON input arguments.
|
|
132
|
+
|
|
133
|
+
### Package a Project
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
uipath pack
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Packages your project into a `.nupkg` file that can be deployed to UiPath.
|
|
140
|
+
|
|
141
|
+
**Note:** Your `pyproject.toml` must include:
|
|
142
|
+
- A description field (avoid characters: &, <, >, ", ', ;)
|
|
143
|
+
- Author information
|
|
144
|
+
|
|
145
|
+
Example:
|
|
146
|
+
```toml
|
|
147
|
+
description = "Your package description"
|
|
148
|
+
authors = [{name = "Your Name", email = "your.email@example.com"}]
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Publish a Package
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
uipath publish
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Publishes the most recently created package to your UiPath Orchestrator.
|
|
158
|
+
|
|
159
|
+
## Project Structure
|
|
160
|
+
|
|
161
|
+
To properly use the CLI for packaging and publishing, your project should include:
|
|
162
|
+
- A `pyproject.toml` file with project metadata
|
|
163
|
+
- A `uipath.json` file (generated by `uipath init`)
|
|
164
|
+
- Any Python files needed for your automation
|
|
165
|
+
|
|
166
|
+
## Development
|
|
167
|
+
|
|
168
|
+
### Setting Up a Development Environment
|
|
169
|
+
|
|
170
|
+
Please read our [contribution guidelines](CONTRIBUTING.md) before submitting a pull request.
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "uipath"
|
|
3
|
+
version = "2.0.0.dev2"
|
|
4
|
+
description = "Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools."
|
|
5
|
+
readme = { file = "README.md", content-type = "text/markdown" }
|
|
6
|
+
requires-python = ">=3.9"
|
|
7
|
+
dependencies = [
|
|
8
|
+
"click>=8.1.8",
|
|
9
|
+
"httpx>=0.28.1",
|
|
10
|
+
"pydantic>=2.11.1",
|
|
11
|
+
"pytest-asyncio>=0.25.3",
|
|
12
|
+
"python-dotenv>=1.0.1",
|
|
13
|
+
"requests>=2.32.3",
|
|
14
|
+
"tenacity>=9.0.0",
|
|
15
|
+
"tomli>=2.2.1",
|
|
16
|
+
"types-requests>=2.32.0.20250306",
|
|
17
|
+
]
|
|
18
|
+
classifiers = [
|
|
19
|
+
"Development Status :: 3 - Alpha",
|
|
20
|
+
"Intended Audience :: Developers",
|
|
21
|
+
"Topic :: Software Development :: Build Tools",
|
|
22
|
+
"Programming Language :: Python :: 3.9",
|
|
23
|
+
"Programming Language :: Python :: 3.10",
|
|
24
|
+
"Programming Language :: Python :: 3.11",
|
|
25
|
+
"Programming Language :: Python :: 3.12",
|
|
26
|
+
]
|
|
27
|
+
maintainers = [
|
|
28
|
+
{ name = "Marius Cosareanu", email = "marius.cosareanu@uipath.com" },
|
|
29
|
+
{ name = "Cristian Pufu", email = "cristian.pufu@uipath.com" },
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
[project.urls]
|
|
33
|
+
Homepage = "https://uipath.com"
|
|
34
|
+
Repository = "https://github.com/UiPath/uipath-python"
|
|
35
|
+
|
|
36
|
+
[project.scripts]
|
|
37
|
+
uipath = "uipath._cli:cli"
|
|
38
|
+
|
|
39
|
+
[build-system]
|
|
40
|
+
requires = ["hatchling"]
|
|
41
|
+
build-backend = "hatchling.build"
|
|
42
|
+
|
|
43
|
+
[tool.hatch.build.targets.wheel]
|
|
44
|
+
packages = ["src/uipath"]
|
|
45
|
+
|
|
46
|
+
[tool.hatch.build.targets.sdist]
|
|
47
|
+
packages = ["src/uipath"]
|
|
48
|
+
|
|
49
|
+
[dependency-groups]
|
|
50
|
+
dev = [
|
|
51
|
+
"bandit>=1.8.2",
|
|
52
|
+
"mypy>=1.14.1",
|
|
53
|
+
"ruff>=0.9.4",
|
|
54
|
+
"rust-just>=1.39.0",
|
|
55
|
+
"pytest>=7.4.0",
|
|
56
|
+
"pytest-cov>=4.1.0",
|
|
57
|
+
"pytest-mock>=3.11.1",
|
|
58
|
+
"pre-commit>=4.1.0",
|
|
59
|
+
"mkdocs>=1.6.1",
|
|
60
|
+
"mkdocs-material>=9.6.7",
|
|
61
|
+
"mkdocstrings>=0.29.0",
|
|
62
|
+
"mkdocstrings-python>=1.16.5",
|
|
63
|
+
]
|
|
64
|
+
|
|
65
|
+
[project.optional-dependencies]
|
|
66
|
+
langchain = ["uipath-langchain==0.0.85"]
|
|
67
|
+
|
|
68
|
+
[tool.ruff]
|
|
69
|
+
line-length = 88
|
|
70
|
+
indent-width = 4
|
|
71
|
+
|
|
72
|
+
[tool.ruff.lint]
|
|
73
|
+
select = ["E", "F", "B", "I", "D"]
|
|
74
|
+
ignore = ["D417"]
|
|
75
|
+
|
|
76
|
+
[tool.ruff.lint.pydocstyle]
|
|
77
|
+
convention = "google"
|
|
78
|
+
ignore-decorators = []
|
|
79
|
+
|
|
80
|
+
[tool.ruff.lint.per-file-ignores]
|
|
81
|
+
"*" = ["E501"]
|
|
82
|
+
"tests/**" = ["D"]
|
|
83
|
+
"*_test.py" = ["D"]
|
|
84
|
+
# TODO: Remove this once the documentation for CLI is updated
|
|
85
|
+
"uipath/_cli/**" = ["D"]
|
|
86
|
+
|
|
87
|
+
[tool.ruff.format]
|
|
88
|
+
quote-style = "double"
|
|
89
|
+
indent-style = "space"
|
|
90
|
+
skip-magic-trailing-comma = false
|
|
91
|
+
line-ending = "auto"
|
|
92
|
+
|
|
93
|
+
[tool.mypy]
|
|
94
|
+
plugins = ["pydantic.mypy"]
|
|
95
|
+
|
|
96
|
+
follow_imports = "silent"
|
|
97
|
+
warn_redundant_casts = true
|
|
98
|
+
warn_unused_ignores = true
|
|
99
|
+
disallow_any_generics = true
|
|
100
|
+
check_untyped_defs = true
|
|
101
|
+
no_implicit_reexport = true
|
|
102
|
+
|
|
103
|
+
disallow_untyped_defs = false
|
|
104
|
+
|
|
105
|
+
[tool.pydantic-mypy]
|
|
106
|
+
init_forbid_extra = true
|
|
107
|
+
init_typed = true
|
|
108
|
+
warn_required_dynamic_aliases = true
|
|
109
|
+
|
|
110
|
+
[tool.pytest.ini_options]
|
|
111
|
+
testpaths = ["tests"]
|
|
112
|
+
python_files = "test_*.py"
|
|
113
|
+
addopts = "-ra -q"
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"""UiPath SDK for Python.
|
|
2
|
+
|
|
3
|
+
This package provides a Python interface to interact with UiPath's automation platform.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
The main entry point is the UiPath class, which provides access to all SDK functionality.
|
|
7
|
+
|
|
8
|
+
Example:
|
|
9
|
+
```python
|
|
10
|
+
# First set these environment variables:
|
|
11
|
+
# export UIPATH_URL="https://cloud.uipath.com/organization-name/default-tenant"
|
|
12
|
+
# export UIPATH_ACCESS_TOKEN="your_**_token"
|
|
13
|
+
# export UIPATH_FOLDER_PATH="your/folder/path"
|
|
14
|
+
|
|
15
|
+
from uipath import UiPath
|
|
16
|
+
sdk = UiPath()
|
|
17
|
+
# Invoke a process by name
|
|
18
|
+
sdk.processes.invoke("MyProcess")
|
|
19
|
+
```
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
from ._uipath import UiPath
|
|
23
|
+
|
|
24
|
+
__all__ = ["UiPath"]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# parse
|
|
2
|
+
|
|
3
|
+
`parse-ast.py` will extract names and types of resources to prepare for bindings. currently it's hardcoded to run on `dummy-main.py`
|
|
4
|
+
|
|
5
|
+
# init
|
|
6
|
+
|
|
7
|
+
asks for project name, type (process/agent) description and target directory where to init the project. it inits a script, a requirements.txt for the user to install, and a config.json file that we'll use at packing time.
|
|
8
|
+
|
|
9
|
+
# pack
|
|
10
|
+
|
|
11
|
+
asks for target directory of the package files and the version and will create a nupkg file
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import importlib.metadata
|
|
2
|
+
import sys
|
|
3
|
+
|
|
4
|
+
import click
|
|
5
|
+
|
|
6
|
+
from .cli_auth import auth as auth # type: ignore
|
|
7
|
+
from .cli_deploy import deploy as deploy # type: ignore
|
|
8
|
+
from .cli_init import init as init # type: ignore
|
|
9
|
+
from .cli_new import new as new # type: ignore
|
|
10
|
+
from .cli_pack import pack as pack # type: ignore
|
|
11
|
+
from .cli_publish import publish as publish # type: ignore
|
|
12
|
+
from .cli_run import run as run # type: ignore
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@click.group(invoke_without_command=True)
|
|
16
|
+
@click.version_option(
|
|
17
|
+
importlib.metadata.version("uipath"),
|
|
18
|
+
prog_name="uipath",
|
|
19
|
+
message="%(prog)s version %(version)s",
|
|
20
|
+
)
|
|
21
|
+
@click.option(
|
|
22
|
+
"-lv",
|
|
23
|
+
is_flag=True,
|
|
24
|
+
help="Display the current version of uipath-langchain.",
|
|
25
|
+
)
|
|
26
|
+
@click.option(
|
|
27
|
+
"-v",
|
|
28
|
+
is_flag=True,
|
|
29
|
+
help="Display the current version of uipath.",
|
|
30
|
+
)
|
|
31
|
+
def cli(lv: bool, v: bool) -> None:
|
|
32
|
+
if lv:
|
|
33
|
+
try:
|
|
34
|
+
version = importlib.metadata.version("uipath-langchain")
|
|
35
|
+
click.echo(f"uipath-langchain version {version}")
|
|
36
|
+
except importlib.metadata.PackageNotFoundError:
|
|
37
|
+
click.echo("uipath-langchain is not installed", err=True)
|
|
38
|
+
sys.exit(1)
|
|
39
|
+
if v:
|
|
40
|
+
try:
|
|
41
|
+
version = importlib.metadata.version("uipath")
|
|
42
|
+
click.echo(f"uipath version {version}")
|
|
43
|
+
except importlib.metadata.PackageNotFoundError:
|
|
44
|
+
click.echo("uipath is not installed", err=True)
|
|
45
|
+
sys.exit(1)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
cli.add_command(new)
|
|
49
|
+
cli.add_command(init)
|
|
50
|
+
cli.add_command(pack)
|
|
51
|
+
cli.add_command(publish)
|
|
52
|
+
cli.add_command(run)
|
|
53
|
+
cli.add_command(deploy)
|
|
54
|
+
cli.add_command(auth)
|