Template Development Kit#
Requirements for Local Template Development
Your favorite text editor or IDE
Template Development Kit (see below)
DSW instance (recommended to have local one) with your admin account
Python 3.7+ (with pip) or Docker
Our Template Development Kit (TDK) provides a simple way how to work with templates locally. It is a CLI tool written in Python.
This is a comprehensive video tutorial on how to use the Template Development Kit.
pip install dsw-tdk dsw-tdk --help
It is also possible to use datastewardshipwizard/dsw-tdk Docker image when you don’t have Python locally:
docker run datastewardshipwizard/dsw-tdk --help
There are these basic commands:
new= create a new template project, it launches a simple interactive wizard for template metadata
list= list all templates (latest versions) from configured DSW
get= download a template project with specified template ID from DSW
put= upload the local template project to DSW (once or continually on-change when
--watchflag is used)
verify= check the metadata of the local template project
package= create a ZIP distribution package from the local template project (ZIP is importable to DSW via its web interface)
Default template directory is current one for
get will create a new folder according to the template ID if not explicitly set in other way.
You can use
--help to find out details:
dsw-tdk new --help
Environment variables and .env file#
You can use environment variables to authenticate:
DSW_API_URL= URL of DSW API with which you want to communicate. Hover mouse over your profile name to find the About section where URL is specified.
DSW_API_KEY= your API Key. Hover mouse over your profile name, click on Edit Profile and then navigate to API Keys From there, you can generate a new API Key for the authentication.
To make this even easier, you can store those in
.env file in the project root and it will be loaded automatically. Or you can specify the path to a
dsw-tdk --dot-env /path/to/.env list