Application
API reference for Application
Application
Application
Represents a GenAI Application container for organizing GenAI application resources.
An Application is a logical container within a Project that groups related GenAI application resources including datasets, experiments, evaluators, and monitoring configurations. Applications provide resource organization, access control, and lifecycle management for GenAI App monitoring workflows.
Key Features:
Resource Organization: Container for related GenAI application resources
Project Context: Applications are scoped within projects for isolation
Access Management: Application-level permissions and access control
Monitoring Coordination: Centralized monitoring and alerting configuration
Lifecycle Management: Coordinated creation, updates, and deletion of resources
Application Lifecycle:
Creation: Create application with unique name within a project
Configuration: Set up datasets, evaluators, and monitoring
Operations: Publish logs, monitor performance, manage alerts
Maintenance: Update configurations and resources
Cleanup: Delete application when no longer needed
Example
# Create a new application for fraud detection
application = Application.create(name="fraud-detection-app", project_id=project_id)
print(f"Created application: {application.name} (ID: {application.id})")
{% hint style="info" %}
Applications are permanent containers - once created, the name cannot be changed.
Deleting an application removes all contained resources and configurations.
Consider the organizational structure carefully before creating applications.
{% endhint %}
#### *classmethod* get_by_id(id_)
Retrieve an application by its unique identifier.
Fetches an application from the Fiddler platform using its UUID. This is the most
direct way to retrieve an application when you know its ID.
#### Parameters
* **id** – The unique identifier (UUID) of the application to retrieve.
Can be provided as a UUID object or string representation.
* **id_** (*UUID* *|* *str*)
#### Returns
The application instance with all metadata and configuration.
**Return type:** `Application`
#### Raises
* **NotFound** – If no application exists with the specified ID.
* **ApiError** – If there’s an error communicating with the Fiddler API.
#### Examplepython
Get application by UUID
application = Application.get_by_id(id_="550e8400-e29b-41d4-a716-446655440000") print(f"Retrieved application: {application.name}") print(f"Created: {application.created_at}") print(f"Project: {application.project.name}")
classmethod get_by_name(name, project_id)
Retrieve an application by name within a project.
Finds and returns an application using its name within the specified project. This is useful when you know the application name and project but not its UUID. Application names are unique within a project, making this a reliable lookup method.
Parameters
name
str
✗
None
The name of the application to retrieve. Application names are unique within a project and are case-sensitive.
project_id
UUID | str
✗
None
The UUID of the project containing the application. Can be provided as a UUID object or string representation.
Returns
The application instance matching the specified name. Return type: Application
Raises
NotFound – If no application exists with the specified name in the project.
ApiError – If there’s an error communicating with the Fiddler API.
Example
# Get project instance
project = Project.get_by_name(name="fraud-detection-project")
# Get application by name within a project
application = Application.get_by_name(
name="fraud-detection-app",
project_id=project.id
)
print(f"Found application: {application.name} (ID: {application.id})")
print(f"Created: {application.created_at}")
print(f"Project: {application.project.name}")
{% hint style="info" %}
Application names are case-sensitive and must match exactly. Use this method
when you have a known application name from configuration or user input.
{% endhint %}
#### *classmethod* list(project_id)
List all applications in a project.
Retrieves all applications that the current user has access to within the specified
project. Returns an iterator for memory efficiency when dealing with many applications.
#### Parameters
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `project_id` | `UUID \| str` | ✗ | `None` | The UUID of the project to list applications from. Can be provided as a UUID object or string representation. |
#### Yields
`Application` – Application instances for all accessible applications in the project.
#### Raises
**ApiError** – If there’s an error communicating with the Fiddler API.
**Return type:** *Iterator*[[*Application*](#fiddler_evals.entities.application.Application)]
#### Examplepython
Get project instance
project = Project.get_by_name(name="fraud-detection-project")
List all applications in a project
for application in Application.list(project_id=project.id): print(f"Application: {application.name}") print(f" ID: {application.id}") print(f" Created: {application.created_at}")
# Convert to list for counting and filteringapplications = list(Application.list(project_id=project.id)) print(f"Total applications in project: {len(applications)}")
Find applications by name pattern
fraud_apps = [ app for app in Application.list(project_id=project.id) if "fraud" in app.name.lower() ] print(f"Fraud detection applications: {len(fraud_apps)}")
classmethod create(name, project_id)
Create a new application in a project.
Creates a new application within the specified project on the Fiddler platform. The application must have a unique name within the project.
Parameters
name
str
✗
None
Application name, must be unique within the project.
project_id
UUID | str
✗
None
The UUID of the project to create the application in. Can be provided as a UUID object or string representation.
Returns
The newly created application instance with server-assigned fields. Return type: Application
Raises
Conflict – If an application with the same name already exists in the project.
ValidationError – If the application configuration is invalid (e.g., invalid name format).
ApiError – If there’s an error communicating with the Fiddler API.
Example
# Get project instance
project = Project.get_by_name(name="fraud-detection-project")
# Create a new application for fraud detection
application = Application.create(
name="fraud-detection-app",
project_id=project.id
)
print(f"Created application with ID: {application.id}")
print(f"Created at: {application.created_at}")
print(f"Project: {application.project.name}")
{% hint style="info" %}
After successful creation, the application instance is returned with
server-assigned metadata. The application is immediately available
for adding datasets, evaluators, and other resources.
{% endhint %}
#### *classmethod* get_or_create(name, project_id)
Get an existing application by name or create a new one if it doesn’t exist.
This is a convenience method that attempts to retrieve an application by name
within a project, and if not found, creates a new application with that name.
Useful for idempotent application setup in automation scripts and deployment pipelines.
#### Parameters
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `name` | `str` | ✗ | `None` | The name of the application to retrieve or create. |
| `project_id` | `UUID \| str` | ✗ | `None` | The UUID of the project to search/create the application in. Can be provided as a UUID object or string representation. |
#### Returns
Either the existing application with the specified name,
: or a newly created application if none existed.
**Return type:** `Application`
#### Raises
* **ValidationError** – If the application name format is invalid.
* **ApiError** – If there’s an error communicating with the Fiddler API.
#### Examplepython
Get project instance
project = Project.get_by_name(name="fraud-detection-project")
Safe application setup - get existing or create new
application = Application.get_or_create( name="fraud-detection-app", project_id=project.id ) print(f"Using application: {application.name} (ID: {application.id})")
Idempotent setup in deployment scripts
application = Application.get_or_create( name="llm-pipeline-app", project_id=project.id )
Use in configuration management
environments = ["dev", "staging", "prod"] applications = {} for env in environments: applications[env] = Application.get_or_create( name=f"fraud-detection-{env}", project_id=project.id )
Last updated
Was this helpful?