# Custom Application Sources

> Custom Application Sources - A DataRobot custom application source that serves as a template for
> creating custom applications.

This Markdown file sits beside the HTML page at the same path (with a `.md` suffix). It summarizes the topic and lists links for tools and LLM context.

Companion generated at `2026-05-06T18:17:09.822779+00:00` (UTC).

## Primary page

- [Custom Application Sources](https://docs.datarobot.com/en/docs/api/reference/sdk/custom-application-sources.html): Full documentation for this topic (HTML).

## Sections on this page

- [classdatarobot.CustomApplicationSource](https://docs.datarobot.com/en/docs/api/reference/sdk/custom-application-sources.html#datarobot.CustomApplicationSource): In-page section heading.
- [classmethodlist(offset=None, limit=None)](https://docs.datarobot.com/en/docs/api/reference/sdk/custom-application-sources.html#datarobot.CustomApplicationSource.list): In-page section heading.
- [classmethodget(source_id)](https://docs.datarobot.com/en/docs/api/reference/sdk/custom-application-sources.html#datarobot.CustomApplicationSource.get): In-page section heading.
- [classmethodcreate(name)](https://docs.datarobot.com/en/docs/api/reference/sdk/custom-application-sources.html#datarobot.CustomApplicationSource.create): In-page section heading.
- [update(name=None)](https://docs.datarobot.com/en/docs/api/reference/sdk/custom-application-sources.html#datarobot.CustomApplicationSource.update): In-page section heading.
- [delete(hard_delete=False)](https://docs.datarobot.com/en/docs/api/reference/sdk/custom-application-sources.html#datarobot.CustomApplicationSource.delete): In-page section heading.
- [NOTE](https://docs.datarobot.com/en/docs/api/reference/sdk/custom-application-sources.html#note): In-page section heading.
- [get_resources()](https://docs.datarobot.com/en/docs/api/reference/sdk/custom-application-sources.html#datarobot.CustomApplicationSource.get_resources): In-page section heading.
- [get_resource_summary()](https://docs.datarobot.com/en/docs/api/reference/sdk/custom-application-sources.html#datarobot.CustomApplicationSource.get_resource_summary): In-page section heading.
- [propertyhas_resources_configured: bool](https://docs.datarobot.com/en/docs/api/reference/sdk/custom-application-sources.html#datarobot.CustomApplicationSource.has_resources_configured): In-page section heading.
- [get_details()](https://docs.datarobot.com/en/docs/api/reference/sdk/custom-application-sources.html#datarobot.CustomApplicationSource.get_details): In-page section heading.
- [classmethodget_by_name(name)](https://docs.datarobot.com/en/docs/api/reference/sdk/custom-application-sources.html#datarobot.CustomApplicationSource.get_by_name): In-page section heading.
- [create_application(name, resources=None, environment_id=None)](https://docs.datarobot.com/en/docs/api/reference/sdk/custom-application-sources.html#datarobot.CustomApplicationSource.create_application): In-page section heading.
- [get_versions()](https://docs.datarobot.com/en/docs/api/reference/sdk/custom-application-sources.html#datarobot.CustomApplicationSource.get_versions): In-page section heading.
- [get_version(version_id)](https://docs.datarobot.com/en/docs/api/reference/sdk/custom-application-sources.html#datarobot.CustomApplicationSource.get_version): In-page section heading.
- [update_resources(resource_label=None, replicas=None, session_affinity=None, service_web_requests_on_root_path=None)](https://docs.datarobot.com/en/docs/api/reference/sdk/custom-application-sources.html#datarobot.CustomApplicationSource.update_resources): In-page section heading.
- [get_file(version_id, item_id)](https://docs.datarobot.com/en/docs/api/reference/sdk/custom-application-sources.html#datarobot.CustomApplicationSource.get_file): In-page section heading.

## Related documentation

- [Developer documentation](https://docs.datarobot.com/en/docs/api/index.html): Linked from this page.
- [API reference](https://docs.datarobot.com/en/docs/api/reference/index.html): Linked from this page.
- [CustomApplication](https://docs.datarobot.com/en/docs/api/reference/sdk/custom-applications.html#datarobot.CustomApplication): Linked from this page.

## Documentation content

### class datarobot.CustomApplicationSource

A DataRobot custom application source that serves as a template for creating custom applications.

Custom application sources define the code, configuration, and resource requirements
used when creating custom applications. They can have resource configurations
that determine the default resource allocation for applications created from this source.

- Variables:

> [!NOTE] Notes
> Resource configuration is stored in the latest_version field and can be accessed
> via the get_resources() method.

#### classmethod list(offset=None, limit=None)

Retrieve a list of custom application sources.

- Parameters:
- Returns: sources – The requested list of custom application sources.
- Return type: List[CustomApplicationSource]

#### classmethod get(source_id)

Retrieve a single custom application source with full details.

- Parameters: source_id ( str ) – The ID of the custom application source to retrieve.
- Returns: source – The requested custom application source.
- Return type: CustomApplicationSource

#### classmethod create(name)

Create a new custom application source.

- Parameters: name ( str ) – The name for the new custom application source.
- Returns: source – The newly created custom application source.
- Return type: CustomApplicationSource

#### update(name=None)

Update this custom application source.

- Parameters: name ( Optional[str] ) – New name for the source. If None, name will not be changed.
- Returns: source – The updated custom application source.
- Return type: CustomApplicationSource

#### delete(hard_delete=False)

Delete this custom application source.

- Parameters: hard_delete ( bool , optional ) – If True, permanently delete the source and all its data.
  If False (default), soft delete the source (can be recovered).
- Return type: None

#### NOTE

Deleting a source will affect all its versions. Applications created from this
source will continue to run but cannot be recreated from the source.

> [!NOTE] Examples
> ```
> from datarobot import CustomApplicationSource
> 
> source = CustomApplicationSource.get("source_id")
> source.delete()  # Soft delete
> source.delete(hard_delete=True)  # Permanent delete
> ```

#### get_resources()

Get resource configuration for applications created from this source.

- Returns: resources – Resource configuration including replicas, resource bundle, and other settings.
  Returns None if no resources are configured.
- Return type: Optional[Dict[str , Any]]

#### get_resource_summary()

Get a human-readable summary of resource configuration.

- Returns: summary – A summary of resource configuration with readable descriptions.
  Returns None if no resources are configured.
- Return type: Optional[Dict[str , Any]]

#### property has_resources_configured : bool

Check if this source has resource configuration.

- Returns: True if resources are configured, False otherwise.
- Return type: bool

#### get_details()

Get comprehensive details about this custom application source.

- Returns: details – Comprehensive source details including metadata, version info, and resources.
- Return type: Dict[str , Any]

#### classmethod get_by_name(name)

Find a custom application source by name.

- Parameters: name ( str ) – The name of the custom application source to find.
- Returns: source – The custom application source if found, None otherwise.
- Return type: Optional[CustomApplicationSource]

#### create_application(name, resources=None, environment_id=None)

Create a Custom Application from this source.

- Parameters:
- Returns: application – The newly created Custom Application.
- Return type: CustomApplication

> [!NOTE] Examples
> ```
> from datarobot import CustomApplicationSource
> 
> source = CustomApplicationSource.get("source_id")
> 
> # Create with default settings
> app1 = source.create_application("My App")
> 
> # Create with custom resources and environment
> app2 = source.create_application(
>     "My App",
>     resources={"replicas": 2, "resourceLabel": "cpu.large"},
>     environment_id="env_id_123"
> )
> ```

#### get_versions()

Get all versions of this custom application source.

- Returns: versions – List of version information for this source.
- Return type: List[Dict[str , Any]]

#### get_version(version_id)

Get details of a specific version of this source.

- Parameters: version_id ( str ) – The ID of the version to retrieve.
- Returns: version – Version details including files, environment, and configuration.
- Return type: Dict[str , Any]

#### update_resources(resource_label=None, replicas=None, session_affinity=None, service_web_requests_on_root_path=None)

Update resource configuration for this source.

- Parameters:
- Returns: source – The updated custom application source.
- Return type: CustomApplicationSource

#### get_file(version_id, item_id)

Retrieve a specific file from a version of this custom application source.

- Parameters:
- Returns: file_data – The file information and content as a JSON object.
- Return type: Dict[str , Any]

> [!NOTE] Examples
> ```
> from datarobot import CustomApplicationSource
> 
> source = CustomApplicationSource.get("source_id")
> 
> # Get the latest version
> versions = source.get_versions()
> version_id = versions[0]["id"]
> 
> # Get a file from that version
> version_info = source.get_version(version_id)
> item_id = version_info["items"][0]["id"]
> file_data = source.get_file(version_id, item_id)
> 
> print(f"File name: {file_data.get('fileName', 'Unknown')}")
> if 'content' in file_data:
>     print(f"Content: {file_data['content']}")
> ```
