Skip to content

Latest commit

 

History

History
57 lines (42 loc) · 1.38 KB

README.md

File metadata and controls

57 lines (42 loc) · 1.38 KB

Usage

larson loads parameters from AWS ssm parameter store, and adds them as shell environment variables.

Download parameters as a json file

$ larson get-parameters /a/parameter/store/path/ > ./example.json
$ cat ./example.json

{
    "alpha": "the_alpha_value",
    "beta": "the_beta_value",
    "delta": "the_delta_value"
}

Load json parameters as environment variables

source larson_json_to_vars ./example.json
$ env | grep 'alpha\|beta\|delta'
alpha=the_alpha_value
delta=the_delta_value
beta=the_beta_value

Upload parameters to parameter store

$ larson put-parameters /a/parameter/store/path/ --input-file=./new-values.json

Installation

pip install larson

Tests

pytest

Release

Larson is available via PyPI. To cut a new release, do the following:

  1. Edit setup.py such that it contains the new release version number.
  2. python -m pip install build
  3. python -m build --wheel
  4. If you see Successfully built larson-<new-version-number>-py3-none-any.whl then proceed. If not, troubleshoot.
  5. Get your PyPI API token by logging into the Ops PBS PyPI account.
  6. After successfully building the wheel, upload with twine: `twine upload dist/. When prompted, enter your API token.