-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
draft: programmatically managing workspaces #609
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
||
# Set headers for API request | ||
headers = { | ||
"Content-Type": "application/json", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: indentation
value: "python", | ||
label: "Python", | ||
language: "python", | ||
content: `from dotenv import load_dotenv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you include submitting a run to each workspace as well?
@hinthornw I think you've sent over code snippets for this use case, anything missing?
@@ -184,6 +186,87 @@ Use [resource tags](#resource-tags) to organize resources by environment using t | |||
permissions when we release attribute based access control (ABAC). ABAC on the resource tag will provide a fine-grained way to restrict access to production tracing projects, for example. We do not recommend that you use Workspaces for environment separation as you cannot share resources | |||
across Workspaces. If you would like to promote a prompt from `staging` to `prod`, we recommend you use prompt tags instead. See [docs](../prompt_engineering/concepts#tags) for more information. | |||
|
|||
### Programmatically Managing Workspaces |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a better title would be Programmatically Operating Across Workspaces
or similar, since these aren't management actions, they're just standard SDK usage for the most part (minus the workspace creation)
} | ||
|
||
session = requests.Session() | ||
session.headers.update(headers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe include a note that this session is shared across the SDK (pretty certain that's the case?), so be careful to avoid operating on the wrong workspace
guide for programmatically managing workspaces. draft