Skip to main content
The squirrels.yml file is the main manifest configuration file for a Squirrels project. It defines your project’s metadata, database connections, datasets, and other settings. The file supports Jinja templating, allowing you to use environment variables and dynamic values.

File structure overview

The manifest file contains the following top-level sections:

project_variables

Defines the core metadata for your Squirrels project. This section is required.
The project_variables section allows additional custom fields beyond the ones listed above. These extra fields can be accessed in your Python configurations and Jinja templates.
When to increment the major version?For an API client that relies on your Squirrels API server, it may expect specific parameter names, parameter options to accept a range of values, or datasets to contain specific column names. If you were to remove a column from a dataset on your existing service for instance, this may break the API client.To account for this, it is recommended to avoid removing or renaming columns or parameters, and document it as deprecated in its description instead. Once you are ready to remove the deprecated feature, increment the major version, and deploy a new service without removing the old version. Since the major version is included in the API path, deploying both versions on the same domain is possible. The old version can be removed after all clients have migrated to the new version.See mounting Squirrels to an existing FastAPI server for guidance on hosting multiple Squirrels apps in one API server.

packages

Defines external Squirrels packages to import. Packages allow you to reuse macros and other resources across projects.
Each package is defined as a list item with the following properties:
Run sqrl deps to download and install all packages defined in this section.

connections

Defines database connections used by your models. Alternatively, connections can be defined with Python in pyconfigs/connections.py.
Each connection is defined as a list item with the following properties:
Use Jinja templating to substitute environment variables in your connection URIs:

parameters

Defining parameters here in yaml is not recommended. Defining parameters with Python in pyconfigs/parameters.py is preferred, especially when using an IDE that provides linting and autocomplete for Python.
Defines parameter widgets for your datasets with YAML.
Each parameter is defined as a list item with the following properties:
For detailed information on parameter types and their options, see the Python reference for parameters.

configurables

Defines project-level configurables that can be set at runtime via HTTP headers. Unlike parameters, these do not get exposed as arguments for MCP tools (i.e., AI agents cannot control them). The default values can also be overridden at the dataset level.
Each configurable is defined as a list item with the following properties:

datasets

Defines the dataset endpoints exposed by your Squirrels API. Each dataset maps to a data model, and can specify parameters and access scopes.
Each dataset is defined as a list item with the following properties:

selection_test_sets

Defines test sets for parameter selections. Test sets are useful for testing and compiling models with specific parameter values.
Each test set is defined as a list item with the following properties:
A test set named default is automatically used when no test set is specified during compilation. You can override the default behavior by defining a test set with this name.

Using Jinja templating

The squirrels.yml file supports Jinja templating, allowing you to:
  • Reference environment variables
  • Use conditional logic
  • Include dynamic content

Environment variables

Access environment variables using the env_vars dictionary:
Environment variables are loaded from .env and .env.local files in your project directory, as well as from system environment variables.

Complete example

Here’s a complete example of a squirrels.yml file:
squirrels.yml