Skip to content

Instantly share code, notes, and snippets.

@cprima
Last active October 29, 2025 13:21
Show Gist options
  • Select an option

  • Save cprima/10c7bbc65dd578940c7654d13d083d9e to your computer and use it in GitHub Desktop.

Select an option

Save cprima/10c7bbc65dd578940c7654d13d083d9e to your computer and use it in GitHub Desktop.
Proposed uipath-sdk-extensions RFC — demonstrates authentication and folder context reuse for UiPath Cloud. Includes full working examples showing .env setup, SDK initialization, context caching, and direct API integration using sdk.api_client.

Important

PyPI publication pending – awaiting organization approval.
Feed will move MyGet → PyPI once approved.

UiPath Cloud Runners cannot consume from MyGet.

If you want access before PyPI is live, request interim package access.

RFC: Extension Package Pattern for UiPath Python SDK

Status: Seeking Community Validation – Alpha v0.0.5 Released
Author: Christian Prior-Mamulyan
Date: 2025-10-28
Package: cprima-forge-uipath-extensions (Reference Implementation)
License: CC-BY-4.0

This is a Request for Comments. This RFC proposes a community extension pattern for filling SDK gaps and seeks feedback from UiPath Python developers. Does this approach solve real problems? What are the tradeoffs? What alternatives should be considered?

The Problem

The official UiPath Python SDK covers ~15% of the Orchestrator API surface. Developers are left writing 150+ lines of manual OData calls, managing folder ID conversions, and juggling authentication headers for operations the SDK doesn't support.

Example gap: Context Grounding storage inspection

  • SDK: Create index ✅ | Trigger ingestion ✅
  • Missing: List files ❌ | Verify file indexed ❌ | Get bucket config ❌

The cost: Hours wasted per developer, repeated across teams, no shared solutions.

The Proposed Pattern: Community Extension Packages

Instead of waiting for official SDK updates or maintaining internal util folders, build community extension packages that:

  1. Wrap, don't fork - Compose around sdk.api_client, inherit auth/retry
  2. Fill gaps fast - Ship in days, not quarters
  3. Prove demand - Popular patterns become candidates for official SDK adoption

This RFC presents cprima-forge-uipath-extensions as a reference implementation of this pattern.

Why This Approach Wins

1. Composition over Forking 🔄

  • Wraps the SDK - Leverages sdk.api_client for auth, retries, token management
  • Zero breaking changes - When SDK adds native support, extension delegates to it
  • Future-proof - Gradual migration path, no code rewrite needed

2. Community Velocity 🚀

  • Ship immediately - No waiting for SDK roadmap or release cycles
  • Developers solve pain - Those who feel the gap build the solution
  • Iterate rapidly - Alpha → feedback → improve in days

3. Innovation Sandbox → Upstream 🌱

  • Proof of demand - Usage metrics validate feature requests
  • Living proof-of-concept - Code ready for SDK team to adopt
  • Feedback loop - Extension users become SDK feature advocates

Real-World Impact: Before vs After

Without Extension (Manual Approach)

Task: List files in Context Grounding storage bucket

# 150+ lines of manual code:
# 1. Lookup folder_id from folder_key (manual OData call)
# 2. Get index → extract bucket name
# 3. Find bucket_id (requires numeric folder_id in headers!)
# 4. List files (juggle both IDs, correct headers, pagination)
# + Error handling, retry logic, caching...

Time: 2 hours to write, debug, test

With Extension

from cpmf.uipath_ext import ContextGroundingExt

cg = ContextGroundingExt(sdk)
files = cg.list_bucket_files(
    index_name="MyIndex",
    folder_key=folder_key,
    recursive=True
)

Time: 2 minutes

The difference: Automated folder context, correct headers, caching, error handling—all inherited from the SDK.

Alpha Test: Try It Now (v0.0.5)

Install from MyGet:

# Using pip:
pip install cprima-forge-uipath-extensions \
  --extra-index-url https://www.myget.org/F/cprima-forge/python/

# Or with uv:
uv pip install cprima-forge-uipath-extensions \
  --extra-index-url https://www.myget.org/F/cprima-forge/python/ \
  --index-strategy unsafe-best-match

Or download from GitHub release: https://github.com/cprima-forge/uipath-extensions/releases/tag/v0.0.5

What's Included (v0.0.5)

11 Extension Modules:

  1. ContextGroundingExt - Storage inspection (list_bucket_files, verify_file_indexed)
  2. BucketExtensions - Direct bucket operations (list_files, get_bucket_info)
  3. FolderUtils - ID conversion utilities (GUID ↔ numeric, with caching)
  4. AssetsExt - Asset CRUD operations
  5. JobsExt - Job management and bulk operations
  6. QueuesExt - Queue definition management
  7. ProcessesExt - Process/release operations
  8. SchedulesExt - Schedule management
  9. LibrariesExt - Library package operations
  10. TasksExt - Human-in-the-loop workflows
  11. FolderManagementExt - Folder hierarchy and permissions

Coverage: ~85% of missing Orchestrator API surface

Quick Test

from uipath import UiPath
from cpmf.uipath_ext import AssetsExt, JobsExt, FolderUtils

sdk = UiPath()

# Test asset listing
assets = AssetsExt(sdk)
asset_list = assets.list_assets(folder_key="your-folder-key")

# Test job statistics
jobs = JobsExt(sdk)
stats = jobs.get_job_statistics(
    folder_key="your-folder-key",
    process_name="YourProcess"
)

print(f"Assets: {len(asset_list)}, Job success rate: {stats['successful']}/{stats['total']}")

Critical Questions for Community Validation

This RFC seeks answers to:

1. Does this solve a real problem?

  • Are you writing custom code for operations the SDK doesn't cover?
  • How much time do you spend maintaining internal utility modules?
  • Would you trust/use a community extension vs. building your own?

2. What SDK gaps hurt most?

  • Which APIs force you to drop to sdk.api_client.request()?
  • Where do you maintain the most wrapper code?
  • Which workflows are most painful without high-level helpers?

3. Is the composition pattern right?

Alternatives to consider:

  • Cookbook recipes - GitHub repo with copy-paste patterns (no package install)
  • Plugin architecture - SDK team provides hooks, community builds plugins
  • Official enhancement proposals - Extension proves demand → SDK adopts

Which model serves developers best?

Contributing: Join the Challenge

This library is fast-moving, community-driven code. Contributions are encouraged!

Fork & Submit PRs

Quick start:

# 1. Fork the repository
# https://github.com/cprima-forge/uipath-extensions (click Fork)

# 2. Add your fork as a submodule in your project
git submodule add -b develop \
  https://github.com/YOUR_USERNAME/uipath-extensions \
  libs/uipath-extensions

# 3. Install in editable mode
cd libs/uipath-extensions
uv pip install -e .

# 4. Make improvements
git checkout -b feature/awesome-improvement
# ... edit code, add methods, fix bugs ...
git commit -am "feat: add awesome feature"

# 5. Push and open Pull Request
git push origin feature/awesome-improvement
# Open PR at: https://github.com/cprima-forge/uipath-extensions/compare

What to Contribute

High-value contributions:

  • New extension modules - TestAutomationExt, MonitoringExt, etc.
  • Missing methods - Fill gaps in existing modules
  • Real-world examples - Proven patterns from production use
  • Documentation - Better examples, troubleshooting guides

Development guides:

Provide Feedback

Report issues:

Share ideas:

Answer validation questions:

  • What SDK gaps cost you the most time?
  • Does this extension solve real problems for you?
  • What utilities do you wish existed?

Technical Reference

Architecture Overview

Pattern: Composition over Inheritance

class ContextGroundingExt:
    def __init__(self, sdk: UiPath):
        self.sdk = sdk  # Wrap, don't replace

    def list_bucket_files(self, index_name, folder_key):
        # Use sdk.api_client for authenticated requests
        response = self.sdk.api_client.request("GET", endpoint, ...)
        return response.json()

Benefits:

  • Inherits SDK's OAuth2 authentication
  • Leverages retry logic and token refresh
  • No duplicate auth/network code
  • When SDK adds native support, delegate to it

Environment Setup

.env configuration:

UIPATH_URL=https://cloud.uipath.com/<account>/<tenant>/orchestrator_/
UIPATH_CLIENT_ID=your-client-id
UIPATH_CLIENT_SECRET=your-client-secret
UIPATH_FOLDER_KEY=your-folder-guid

Credentials retrieval:

  1. Navigate to UiPath Cloud → Admin → External Applications
  2. Create Confidential Application with Client Credentials grant
  3. Copy Client ID, Secret, Orchestrator URL to .env

The Two-ID Problem

UiPath uses two folder identifiers:

Identifier Type Format Used By
folder_key GUID 5ebb73c3-b114-... SDK + some OData
folder_id Integer 5083200 Buckets + raw API

Extension solution: FolderUtils handles conversion and caches results.

from cpmf.uipath_ext import FolderUtils

folder_utils = FolderUtils(sdk)
folder_id = folder_utils.get_folder_id_from_key(folder_key)  # Cached

Project Links

License & Disclaimer

This document and the associated package are released under the Creative Commons Attribution 4.0 International (CC-BY 4.0) license.

UiPath® is a registered trademark of UiPath, Inc.

This RFC and the cprima-forge-uipath-extensions package are independent community contributions and are not affiliated with, endorsed by, or supported by UiPath, Inc.


Call to Action

The goal: Build what developers actually need, not what we assume they need.

This RFC needs your input:

  1. Alpha test - Install v0.0.5, report what works (or doesn't)
  2. Validate the pattern - Does composition over forking make sense?
  3. Shape the roadmap - Which SDK gaps hurt most?
  4. Contribute - Fork, improve, submit PRs

Respond via:

Let's solve this together.

@cprima
Copy link
Author

cprima commented Oct 26, 2025

If you made it until here: My PyPi organization request is currently pending. Comment here if you need a pointer to an unofficial PyPi package :)
Will publish to PyPi as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment