Skip to main content

No project description provided

Project description

Kedro Templar

About

A plugin build for Kedro to support templating configuration files. Using this plugin you can specify a templates for your configuration files such as catalog.yaml, paramters.yaml and fill them automatically using one file with specified variables. Using this approach you can easily parametrize you pipeline from single point.

Usage examples:

  • you can store multiple simultaneous configurations and switch between them on demand.
  • change prefixes in catalog.yaml to reuse the same pipeline for different data,

Install

Plugin can be easily installed using pypi repository.

pip install kedro-templar

Templates

kedro-templar is using jinja2 templating engine for rendering files.

Example

catalog.yaml

Template created for catalog.yaml file.

sample_data:
  type: pandas.CSVDataSet
  save_args:
    index: True
  filepath: s3://your_bucket/{{run_name}}/{{another_subname}}/data/sample_data.csv

definition.yaml

Your file that contains all variables used for templating.

run_name: run_1
another_subname: subfolder

Commands

Currently, this plugin supports 3 commands:

apply

A core logic of this plugin. This command is used to create config files based on provided templates and a file with variables.

You can setup a default values using environment variables:

  • TEMPLAR_TEMPLATES_DIR - a default directory for your templates
  • TEMPLAR_OUTPUT_DIR - a default directory where templates will be rendered

If no value is specified explicitly and env var is empty, the commands will use default value specified in the code.

kedro templar apply -c definition.yaml

download

A helper function used to download a config file from a given S3 path

kedro templar download -i <S3_PATH>/definition.yaml -o definition.yaml

upload

A helper function used to upload a config file to a given S3 path

kedro templar upload -i definition.yaml -o <S3_PATH>/definition.yaml

Contact

Plugin was created by the Data Science team from WebInterpret.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kedro_templar-0.0.1.tar.gz (7.2 kB view details)

Uploaded Source

Built Distributions

kedro_templar-0.0.1-py3.8.egg (10.3 kB view details)

Uploaded Source

kedro_templar-0.0.1-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file kedro_templar-0.0.1.tar.gz.

File metadata

  • Download URL: kedro_templar-0.0.1.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.5

File hashes

Hashes for kedro_templar-0.0.1.tar.gz
Algorithm Hash digest
SHA256 6ff103e36ceff9ca251e18cec735d549e17f3c347dc3d22193d0f35170cdc02a
MD5 c2a92ed8d0de8300ca2c9c9598a187ab
BLAKE2b-256 0930d987670afcd25a083a9220b312bc095327faa4e32434f0746e64f55e3a98

See more details on using hashes here.

File details

Details for the file kedro_templar-0.0.1-py3.8.egg.

File metadata

  • Download URL: kedro_templar-0.0.1-py3.8.egg
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.5

File hashes

Hashes for kedro_templar-0.0.1-py3.8.egg
Algorithm Hash digest
SHA256 27326bba69fe875774cf691c983cb6d67b4674a5efb97fc037682eb64621faa6
MD5 4b7eab05f8a2f95d7a2049279b31f97c
BLAKE2b-256 6543d655435347f5361d7c25fe70f929d8c8aadc2081daf84adfa230c5567687

See more details on using hashes here.

File details

Details for the file kedro_templar-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for kedro_templar-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 68b68a7a41b8d0e8886ec3a33dc5ff96561bb5a01c74d6e1eeaae851d8eabaa3
MD5 97639e9f509025cd9f46dec0935c8bd1
BLAKE2b-256 ba33dbb2b04fe84f6a5d421357ec2ab91c572b15cf9d1d694c2ea5c328fbe202

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page