<@ULVA73B9P> is there any way to retrieve the acco...
# ask-marvin
m
@Marvin is there any way to retrieve the account and workspace programmatically via the python sdk?
m
To retrieve the account and workspace programmatically via the Prefect Python SDK, it seems you would typically interact with Prefect Cloud using the Prefect CLI commands rather than directly through the SDK. The documentation does not directly provide examples of fetching the account and workspace with the Python SDK, but it does explain how you can change workspaces and log in using the CLI. For programmatically handling operations, you might need to use relevant API calls or inspect client methods within the SDK to find similar functionality. Unfortunately, the documentation excerpts provided didn't include that level of detail. If you're interested in using the Prefect CLI, here are the commands you can use: To set a workspace:
Copy code
$ prefect cloud workspace set --workspace "prefect/my-workspace"
To log in to Prefect Cloud:
Copy code
$ prefect cloud login
For more detailed information, you can refer to the following sections of the Prefect documentation: - Connecting to Prefect Cloud - Workspaces