- Información general
- Funciones de Python
- Implementar y ejecutar
Las funciones de Python llegan a los recursos de Orchestrator a través del cliente UiPath(). Las credenciales y las referencias de recursos se resuelven en runtime: no se almacenan secretos en tu código ni se envían dentro del paquete.
from uipath.platform import UiPath
sdk = UiPath()
from uipath.platform import UiPath
sdk = UiPath()
Activos
Recupera un valor de activo con nombre (por ejemplo, un token de API o una URL base) de una carpeta:
asset = sdk.assets.retrieve("API_BASE_URL", folder_path="Shared")
asset = sdk.assets.retrieve("API_BASE_URL", folder_path="Shared")
Depósitos
Descarga y carga archivos desde los depósitos de almacenamiento de Orchestrator:
sdk.buckets.download(
name="Invoices",
blob_file_path="invoice.pdf",
destination_path="/tmp/invoice.pdf",
folder_path="Shared",
)
sdk.buckets.download(
name="Invoices",
blob_file_path="invoice.pdf",
destination_path="/tmp/invoice.pdf",
folder_path="Shared",
)
Conexiones
Retrieve the metadata of an Integration Service connection by id:
conn = sdk.connections.retrieve("connection-id")
conn = sdk.connections.retrieve("connection-id")
This returns the connection's id, base URI, and folder. It does not call the connector. To invoke a connector operation — the equivalent of a Studio activity such as Get Email By ID — see Call an Integration Service activity.
The connection id is a design-time value declared as a binding, not a function input. See Resource bindings.
Otros servicios
El cliente de la plataforma también expone colas, trabajos, procesos, documentos y entidades. Consulta la referencia del SDKuipath para obtener la superficie completa y las firmas de métodos.
Credenciales y seguridad
- Los secretos se encuentran en los activos de Orchestrator , recuperados en runtime; nunca los codifiques ni los confirmes en el proyecto.
- Una función se ejecuta bajo la identidad con la que se invoca; RBAC a nivel de carpeta controla qué activos y recursos puede leer.
- Resource references are declared in
bindings.jsonand remapped to the target tenant's resources at runtime, so one package serves every tenant. - An unmapped binding does not fail the job: the call falls back to the design-time identifier, so a function deployed elsewhere can reach for the original tenant's resource.