Skip to main content

A poetry plugin to store the current git branch into environment variable when poetry runs any command.

Project description

Poetry Git Branch Plugin

A simple poetry plugin that sets an environment variable containing the name of the current checked-out branch before executing any poetry command.

Why

Our main use case is in situations where DBT needs access to the current git branch name to set the name of the target schema.

Installation

The plugin cannot be installed with poetry self add because it is not published on PyPI. Instead, you can install it by building a wheels file

poetry build

and installing it with your system-wide or pyenv-wide pip.

# not inside pycharm nor inside a poetry shell
pip install /path/to/poetry-git-branch-plugin/dist/poetry_git_branch_plugin-0.1.0-py3-none-any.whl

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

poetry_git_branch_plugin-0.1.0.tar.gz (2.3 kB view hashes)

Uploaded Source

Built Distribution

poetry_git_branch_plugin-0.1.0-py3-none-any.whl (3.4 kB view hashes)

Uploaded Python 3

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