Initialize a Snowpark project

The first step when creating Snowpark projects is to create a project boilerplate. The snow snowpark init <project-name> command creates a fully-functional boilerplate with the following structure:

snowflake.yml      - project definition
requirements.txt   - project dependencies
app/               - code of functions and procedures
  __init__.py
  functions.py     - example functions
  procedures.py    - example procedures
  common.py        - example "shared library"
  • The snowflake.yml file contains a project definition that describes the project structure that the snow snowpark commands use.

  • The app directory stores the project code. You can think about it as a Python module. All functions and procedures must reside in this directory.

  • The requirements.txt file contains project dependencies. You can add more dependencies (such as previously deployed code) as imports parameters in the function and procedure declarations in the project definition.