Project
API reference for Project
Project
Represents a project container for organizing GenAI Apps and resources.
A Project is the top-level organizational unit in Fiddler that groups related GenAI Applications, datasets, and monitoring configurations. Projects provide logical separation, access control, and resource management for GenAI App monitoring workflows.
Key Features:
GenAI Apps Organization: Container for related GenAI apps
Resource Isolation: Separate namespaces prevent naming conflicts
Access Management: Project-level permissions and access control
Monitoring Coordination: Centralized monitoring and alerting configuration
Lifecycle Management: Coordinated creation, updates, and deletion of resources
Project Lifecycle:
Creation: Create project with unique name within organization
App creation: Create GenAI applications with Application().create()
Configuration: Set up monitoring, alerts, and evaluators.
Operations: Publish logs, monitor performance, manage alerts
Maintenance: Update configurations
Cleanup: Delete project when no longer needed (removes all contained resources)
Example
Projects are permanent containers - once created, the name cannot be changed. Deleting a project removes all contained models, datasets, and configurations. Consider the organizational structure carefully before creating projects.
classmethod get_by_id(id_)
Retrieve a project by its unique identifier.
Fetches a project from the Fiddler platform using its UUID. This is the most direct way to retrieve a project when you know its ID.
Parameters
id – The unique identifier (UUID) of the project to retrieve. Can be provided as a UUID object or string representation.
id_ (UUID | str)
Returns
The project instance with all metadata and configuration. Return type: Project
Raises
NotFound – If no project exists with the specified ID.
ApiError – If there’s an error communicating with the Fiddler API.
Example
This method makes an API call to fetch the latest project state from the server. The returned project instance reflects the current state in Fiddler.
classmethod get_by_name(name)
Retrieve a project by name.
Finds and returns a project using its name within the organization. This is useful when you know the project name but not its UUID. Project names are unique within an organization, making this a reliable lookup method.
Parameters
name
str
✗
None
The name of the project to retrieve. Project names are unique within an organization and are case-sensitive.
Returns
The project instance matching the specified name. Return type: Project
Raises
NotFound – If no project exists with the specified name in the organization.
ApiError – If there’s an error communicating with the Fiddler API.
Example
Project names are case-sensitive and must match exactly. Use this method when you have a known project name from configuration or user input.
classmethod list()
List all projects in the organization.
Retrieves all projects that the current user has access to within the organization. Returns an iterator for memory efficiency when dealing with many projects.
Yields
Project – Project instances for all accessible projects.
Raises
ApiError – If there’s an error communicating with the Fiddler API. Return type: Iterator[Project]
Example
This method returns an iterator for memory efficiency. Convert to a list with list(Project.list()) if you need to iterate multiple times or get the total count. The iterator fetches projects lazily from the API.
classmethod create(name)
Create the project on the Fiddler platform.
Persists this project instance to the Fiddler platform, making it available for adding GenAI Apps, configuring monitoring, and other operations. The project must have a unique name within the organization.
Parameters
name
str
✗
None
Project name, must be unique within the organization. Should follow slug-like naming conventions: Use lowercase letters, numbers, hyphens, and underscores; Start with a letter or number
Returns
This project instance, updated with server-assigned fields like : ID, creation timestamp, and other metadata. Return type: Project
Raises
Conflict – If a project with the same name already exists in the organization.
ValidationError – If the project configuration is invalid (e.g., invalid name format).
ApiError – If there’s an error communicating with the Fiddler API.
Example
After successful creation, the project instance is returned with server-assigned metadata. The project is immediately available for adding GenAI Apps and other resources.
classmethod get_or_create(name)
Get an existing project by name or create a new one if it doesn’t exist.
This is a convenience method that attempts to retrieve a project by name, and if not found, creates a new project with that name. Useful for idempotent project setup in automation scripts and deployment pipelines.
Parameters
name
str
✗
None
The name of the project to retrieve or create. Must follow project naming conventions (slug-like format).
Returns
Either the existing project with the specified name, : or a newly created project if none existed. Return type: Project
Raises
ValidationError – If the project name format is invalid.
ApiError – If there’s an error communicating with the Fiddler API.
Example
This method is idempotent - calling it multiple times with the same name will return the same project. It logs when creating a new project for visibility in automation scenarios.
Last updated
Was this helpful?