Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.pysquirrels.com/llms.txt

Use this file to discover all available pages before exploring further.

ContextArgs is the class type of the sqrl argument for the context configuration function (i.e. the main function in the pyconfigs/context.py file), which runs every time an API request is made. The class can be imported from the squirrels.arguments or squirrels module.

Properties

project_path
str
Path to the Squirrels project directory.
proj_vars
dict[str, Any]
A copy of project variables as a dictionary.
env_vars
dict[str, str]
A copy of environment variables as a dictionary.
user
AbstractUser
The current authenticated user.
prms
dict[str, Parameter]
A copy of the parameters dictionary.
configurables
dict[str, str]
A copy of the configurables dictionary (values set by application).

Methods

set_placeholder()

Sets a placeholder value for use in SQL queries.
def set_placeholder(self, placeholder: str, value: TextValue | Any) -> str:
returns
str
An empty string (because this function is also available to call from Jinja).

param_exists()

Checks whether a given parameter exists and contains options.
def param_exists(self, param_name: str) -> bool:
returns
bool
True if the parameter exists and is enabled, False otherwise.