{"id":5543,"library":"uipath","title":"UiPath Python SDK","description":"The UiPath Python SDK provides programmatic interaction with UiPath Cloud Platform services, including processes, assets, buckets, context grounding, data services, and jobs. It also features a CLI for creation, packaging, and deployment of automations to the UiPath Cloud Platform. The library is actively developed, with minor releases (X.Y.0) potentially introducing breaking changes and patch releases (X.Y.Z) for bug fixes and new features, usually on a monthly or bi-monthly cadence.","status":"active","version":"2.10.48","language":"en","source_language":"en","source_url":"https://github.com/UiPath/uipath-python","tags":["rpa","automation","uipath","sdk","cli"],"install":[{"cmd":"pip install uipath","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"The core 'platform' module was extracted into this separate library in `uipath` v2.9.0 and is now a direct dependency for interacting with platform services.","package":"uipath-platform","optional":false}],"imports":[{"note":"As of v2.9.0, the main 'UiPath' class for interacting with platform services has moved from the top-level package to the 'uipath.platform' submodule, now part of the `uipath-platform` dependency.","wrong":"from uipath import UiPath","symbol":"UiPath","correct":"from uipath.platform import UiPath"}],"quickstart":{"code":"import os\nfrom uipath.platform import UiPath\n\n# Configure environment variables (replace with your actual values or .env file)\nUIPATH_URL = os.environ.get('UIPATH_URL', 'https://cloud.uipath.com/ACCOUNT_NAME/TENANT_NAME')\nUIPATH_ACCESS_TOKEN = os.environ.get('UIPATH_ACCESS_TOKEN', 'YOUR_TOKEN_HERE')\n\n# Ensure environment variables are set for authentication\nif not UIPATH_URL or not UIPATH_ACCESS_TOKEN:\n    print(\"Please set UIPATH_URL and UIPATH_ACCESS_TOKEN environment variables.\")\n    exit(1)\n\nos.environ['UIPATH_URL'] = UIPATH_URL\nos.environ['UIPATH_ACCESS_TOKEN'] = UIPATH_ACCESS_TOKEN\n\ntry:\n    # Initialize the SDK\n    sdk = UiPath()\n    print(f\"Successfully initialized UiPath SDK for URL: {UIPATH_URL}\")\n\n    # Example: List available processes (requires appropriate permissions)\n    # Note: Error handling for API calls should be implemented in production code\n    processes = sdk.processes.list()\n    print(f\"Found {len(processes)} processes:\")\n    for p in processes:\n        print(f\"  - {p.name} (Key: {p.key})\")\n\n    # Example: Invoke a process (uncomment and modify for actual use)\n    # job = sdk.processes.invoke(\n    #     name=\"MyProcess\",\n    #     input_arguments={\"param1\": \"value1\", \"param2\": 42}\n    # )\n    # print(f\"Process invoked, Job ID: {job.id}\")\n\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")\n","lang":"python","description":"This quickstart demonstrates how to initialize the UiPath SDK and interact with basic services like listing processes. It requires `UIPATH_URL` and `UIPATH_ACCESS_TOKEN` to be set as environment variables. The SDK provides access to services like `sdk.processes`, `sdk.assets`, `sdk.buckets`, `sdk.connections`, `sdk.context_grounding`, `sdk.jobs`, `sdk.queues`, `sdk.tasks`, and `sdk.api_client`."},"warnings":[{"fix":"Review your `uipath.json` and any code interacting with `UiPathFunctionsRuntime.get_schema()` to account for `type: \"function\"` for entrypoints defined under 'functions'.","message":"The schema 'type' field for coded functions changed from 'agent' to 'function'. This affects how `UiPathFunctionsRuntime.get_schema()` behaves if you were expecting 'type: agent'.","severity":"breaking","affected_versions":"v2.10.0 and later"},{"fix":"Install `uipath-platform` explicitly (`pip install uipath-platform`) and update imports from `from uipath import UiPath` to `from uipath.platform import UiPath`. Review any code using `context grounding` for updated contract specifications.","message":"The `platform` module, including the main `UiPath` class, was extracted into a new `uipath-platform` library. Additionally, `context grounding` contract changes removed `PreProcessing` and `Fields`, and added `extraction_strategy`, `embeddings_enabled`, `is_encrypted`.","severity":"breaking","affected_versions":"v2.9.0 and later"},{"fix":"Consult the official release notes for v2.2.0 for specific migration steps related to Studio Web integration and the Evaluation Framework.","message":"Version 2.2.0 introduced several breaking changes related to Studio Web Integration (`uipath push`/`uipath pull` commands) and the new Evaluation Framework (`uipath eval` command).","severity":"breaking","affected_versions":"v2.2.0 and later"},{"fix":"If encountering 'Python Scope: Error initializing Python engine' or similar issues when integrating with UiPath Studio, verify the Python version compatibility required by your specific 'UiPath.Python.Activities' package and UiPath Studio version. The `uipath` Python SDK's requirements are separate from UiPath Studio's activity package requirements.","message":"While the `uipath` Python SDK itself requires Python >=3.11, users integrating Python scripts via UiPath Studio's 'Python Activities' (a separate UiPath package) might encounter compatibility issues with Python versions newer than 3.10 or 3.12, depending on the UiPath Studio version. Always check the UiPath Studio documentation for 'Python Activities' specific compatibility if using that integration method.","severity":"gotcha","affected_versions":"All versions of UiPath Studio's Python Activities"}],"env_vars":null,"last_verified":"2026-04-13T00:00:00.000Z","next_check":"2026-07-12T00:00:00.000Z"}