- Visão geral
- Funções do Python
- Implantar e executar
As funções do Python alcançam recursos do Orchestrator por meio do cliente UiPath(). As credenciais e as referências de recursos são resolvidas no runtime — nenhum segredo é armazenado em seu código ou enviado dentro do pacote.
from uipath.platform import UiPath
sdk = UiPath()
from uipath.platform import UiPath
sdk = UiPath()
Ativos
Recupere um valor de ativo nomeado (por exemplo, um token de API ou URL base) de uma pasta:
asset = sdk.assets.retrieve("API_BASE_URL", folder_path="Shared")
asset = sdk.assets.retrieve("API_BASE_URL", folder_path="Shared")
Buckets
Faça o download e carregue arquivos de buckets de armazenamento do 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",
)
Conexões
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.
Outros Serviços
O cliente de plataforma também expõe filas, trabalhos, processos, documentos e entidades. Consulte a referênciauipath do SDK para obter as assinaturas completas de superfície e método.
Credenciais e segurança
- Os segredos residem em ativos do Orchestrator, recuperados no runtime — nunca codifique-os ou confirme-os para o projeto.
- Uma função é executada sob a identidade com a qual é invocada; O RBAC no nível da pasta rege quais ativos e recursos ele pode ler.
- 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.