> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galileo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# projects

## Module

Utility functions for project operations.

## resolve\_project\_id

```python theme={null}
def resolve_project_id(project_id: Optional[str]=None,
                       project_name: Optional[str]=None,
                       allow_none: bool=False,
                       validate: bool=True) -> Optional[str]
```

Resolve project\_name to project\_id if needed.

**Arguments**

* `project_id` (`Optional[str]`): The project ID. If provided, returns it (optionally validating it exists).
* `project_name` (`Optional[str]`): The project name. If provided, looks up and returns the project ID.
* `allow_none` (`bool`): If True, allows both parameters to be None and returns None.
  If False, raises ValueError when both are None. Defaults to False.
* `validate` (`bool`): If True, validates that the project exists. If False, skips validation.
  Defaults to True.

**Raises**

* `ValueError`: If both project\_id and project\_name are provided,
  or if neither is provided and allow\_none=False,
  or if the project doesn't exist (when validate=True).

**Returns**

* `Optional[str]`: The resolved project ID, or None if neither was provided and allow\_none=True.
