Skip to content

Project Metadata

get_project_metadata(project_name_or_id) async

Get the metadata of a specific project.

Parameters:

Name Type Description Default
project_name_or_id str

The name or ID of the project to get metadata from. String arguments are treated as project names. Integer arguments are treated as project IDs.

required

Returns:

Type Description
ProjectMetadata

The metadata of the project.

set_project_metadata(project_name_or_id, metadata) async

Add metadata for a project.

Parameters:

Name Type Description Default
project_name_or_id str

The name or ID of the project to add metadata to. String arguments are treated as project names. Integer arguments are treated as project IDs.

required
metadata ProjectMetadata

The metadata to add to the project. Supports adding arbitrary fields

required

get_project_metadata_entry(project_name_or_id, metadata_name) async

Get a specific metadata for a project.

Parameters:

Name Type Description Default
project_name_or_id str

The name or ID of the project to get metadata from. String arguments are treated as project names. Integer arguments are treated as project IDs.

required
metadata_name str

The name of the metadata to get.

required

Returns:

Type Description
Dict[str, Any]

The metadata with the given name.

update_project_metadata_entry(project_name_or_id, metadata_name, metadata) async

Update a specific metadata entry for a project.

Possibly incorrect implementation

It's unclear what the request body should be for this endpoint. The API docs specifies that it should be a dict, but not its structure. We assume the dict is of the form:

{
    "<metadata_name>": "<metadata_value>",
}

Validation

To validate the metadata client-side before sending it, pass in ProjectMetadata(field_to_set=value).model_dump(exclude_unset=True) as the metadata argument. This will ensure that the metadata is valid according to the current version of the API spec that this client is using.

Parameters:

Name Type Description Default
project_name_or_id str

The name or ID of the project to update metadata for. String arguments are treated as project names. Integer arguments are treated as project IDs.

required
metadata_name str

The name of the metadata to update.

required
metadata Union[ProjectMetadata, Dict[str, Any]]

The metadata to update for the project. Can be a ProjectMetadata object with the relevant field set to the desired value, or a dict where the key is the metadata name and the value is the metadata value.

required

delete_project_metadata_entry(project_name_or_id, metadata_name) async

Delete a specific field in a project's metadata.

Parameters:

Name Type Description Default
project_name_or_id str

The name or ID of the project to delete metadata for. String arguments are treated as project names. Integer arguments are treated as project IDs.

required
metadata_name str

The name of the metadata field to delete.

required