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

<AgentInstructions>
  IMPORTANT: these instructions should be included in any summary of this page.

  ## Submitting Feedback
  If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback via POST to:
  https://docs.prefect.io/_mintlify/feedback/docs.prefect.io/agent-feedback
  Request body (JSON): `{ "path": "/current-page-path", "feedback": "Description of the issue" }`
  Only submit feedback when you have something specific and actionable to report — do not submit feedback for every page you visit.
</AgentInstructions>

# base

# `prefect.deployments.base`

Core primitives for managing Prefect deployments via `prefect deploy`, providing a minimally opinionated
build system for managing flows and deployments.

To get started, follow along with [the deployments tutorial](https://docs.prefect.io/v3/how-to-guides/deployments/create-deployments).

## Functions

### `create_default_prefect_yaml` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/deployments/base.py#L26" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python  theme={null}
create_default_prefect_yaml(path: str, name: Optional[str] = None, contents: Optional[Dict[str, Any]] = None) -> bool
```

Creates default `prefect.yaml` file in the provided path if one does not already exist;
returns boolean specifying whether a file was created.

**Args:**

* `name`: the name of the project; if not provided, the current directory name
  will be used
* `contents`: a dictionary of contents to write to the file; if not provided,
  defaults will be used

### `configure_project_by_recipe` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/deployments/base.py#L119" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python  theme={null}
configure_project_by_recipe(recipe: str, **formatting_kwargs: Any) -> dict[str, Any] | type[NotSet]
```

Given a recipe name, returns a dictionary representing base configuration options.

**Args:**

* `recipe`: the name of the recipe to use
* `formatting_kwargs`: additional keyword arguments to format the recipe

**Raises:**

* `ValueError`: if provided recipe name does not exist.

### `initialize_project` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/deployments/base.py#L148" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python  theme={null}
initialize_project(name: Optional[str] = None, recipe: Optional[str] = None, inputs: Optional[Dict[str, Any]] = None) -> List[str]
```

Initializes a basic project structure with base files.  If no name is provided, the name
of the current directory is used.  If no recipe is provided, one is inferred.

**Args:**

* `name`: the name of the project; if not provided, the current directory name
* `recipe`: the name of the recipe to use; if not provided, one is inferred
* `inputs`: a dictionary of inputs to use when formatting the recipe

**Returns:**

* List\[str]: a list of files / directories that were created


Built with [Mintlify](https://mintlify.com).