Skip to main content

About Squirrels Projects

Project Structure

At the minimum, all Squirrels projects contain a squirrels.yml file for project configurations. In addition, a Squirrels project may also include the following resources:

ResourceGit_IgnoredDescription
environcfg.ymlYContains configuration specific to the server/environment, or environment variables that must not be shared
models/NFolder for data models (as Jinja SQL or Python files)
pyconfigs/NContains only Python files for configurations or functionality written in Python (other than Python models).
sqrl_packages/YGit projects used as package dependencies (downloaded with sqrl deps) are stored here
target/YAll output files generated by Squirrels (such as compiled SQL files from sqrl compile) are created here

Within the models/ and pyconfigs/ folders, the Squirrels framework can also make use of the following resources in the project:

FolderResourceDescription
modelsdbviews/Data models that run against an external database
modelsfederates/Data models that join together one or more other models using an embedded database
pyconfigsconnections.pySpecifies a set of database connections as SQLAlchemy engines that the project uses in Python. Only needed if not specified already in YAML in the squirrels.yml file
pyconfigsparameters.pySpecifies a set of widget parameters (in Python) for datasets to use, typically used if the widget parameters are not specified in the squirrels.yml file (in YAML, which can be more verbose)
pyconfigscontext.pyPython script that processes real-time parameter selections into meaningful Python variables (or "context variables") that can be used by models
pyconfigsauth.pyLets you create your own user model and method for authenticating against your source of users

You may also add other folders/files in your Squirrels project that's not referenced directly by the framework, but may be referenced by existing Squirrels files. For instance, it is common to create a macros folder to store Jinja files used by data models written in Jinja SQL.