Skip to main content

Environment variable manager for Mac

Project description

evm-fm-python

Environment variable manager for Mac, written in Python

NOTE: This project is still in the alpha phase of development

Objectives

This project is a configuration management tool for Mac aimed at keeping a local environment variable file up-to-date with values stored in external secret/key management systems.

Supported Secret/Key Management Systems

  • AWS Parameter Store

Overview

This project takes advantage of the launchd daemon on Mac operating systems to continually monitor external secret/key management systems to keep a local environment variable file up-to-date. This project allows users to create/load/unload a launchd LaunchAgent that accomplishes just that. All you need to do is provide a configuration file and specify an action and evm-fm-python takes care of the rest.

Basic Usage

Available actions:

  1. Create This action creates the LaunchAgent
    $ evm-fm --config-file <path_to_configuration_file>
    
  2. Load This action creates, loads, and starts the LaunchAgent
    $ evm-fm --config-file <path_to_configuration_file> --load
    
  3. Unload This action unloads and stops the LaunchAgent
    $ evm-fm --config-file <path_to_configuration_file> --unload
    

Arguments

Command Line Metadata Required Description
-f, --config-file file path True Location of configuration file
-l, --load False Whether the LaunchAgent should be loaded
-u, --unload False Whether the evm LaunchAgent should be unloaded

Configuration File

This file contains all necessary configurations for evm-fm-python to perform the available actions. The configuration file can be located anywhere that can be accessed by the evm-fm-python project.

NOTE: The configuration file needs to be a .toml file. See https://github.com/toml-lang/toml for additional information about this file type

Key Value Type Required Default Children Parent Description
env_file_path String True - - - File path of the environment variable file you wish evm-fm-python to update
param_store_prefixes List of Strings True - - - Prefixes you want evm-fm-python to use when pulling secret/key values from the supported secret/key management systems
config_file_loc String True - - - Path of the configuration file
launchd_std_out_log_loc String False /usr/local/bin/log/env_var_manager.log - - Path of the stdout log file you want the LaunchAgent to write to
launchd_python_path String False /usr/bin/python - - Path of the Python executable you want the LaunchAgent to use
launchd_std_err_log_loc String False /usr/local/bin/log/env_var_manager.log - - Path of the stderr log file you want the LaunchAgent to write to
launchd_start_interval Integer False 120 - - Time interval you want the LaunchAgent to run on in Seconds
post_commands List of Dictionaries False - command, shell - List of commands you want to be executed after the local environment file has been updated
command String True - - post_commands The post command you wish to be executed
shell String True - - post_commands Whether you wish the post command to be executed in a shell environment

Example Configuration File

env_file_path = "/Users/user/example/envs/.env"
param_store_prefixes = ["/Development/Test/", "/Production/Test/"]
launchd_python_path = "/Users/user/.virtualenvs/example/bin/python"
config_file_loc = '/Users/user/example/configuration_file.toml'
launchd_std_out_log_loc = "/Users/user/example/logs/env_var_manager.log"
launchd_std_err_log_loc = "/Users/user/example/logs/env_var_manager.log"
launchd_start_interval = 340

[[post_commands]]
command = "source /Users/user/example/envs/.env"
shell = true

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

evm-fm-python-0.1.6.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

evm_fm_python-0.1.6-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file evm-fm-python-0.1.6.tar.gz.

File metadata

  • Download URL: evm-fm-python-0.1.6.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.7

File hashes

Hashes for evm-fm-python-0.1.6.tar.gz
Algorithm Hash digest
SHA256 0444e801ca60539ceb5e9b43ba1790be1f4fab3356d61660332e85e5d26f18a3
MD5 6672e438c848eed845bec59e779a69d6
BLAKE2b-256 a2e5233090191f4e7ae83a81c4d5bfe6505b0c8c67f1b687e48085f04f889cb7

See more details on using hashes here.

File details

Details for the file evm_fm_python-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: evm_fm_python-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.7

File hashes

Hashes for evm_fm_python-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 68f3b3dffef4134062ddb32e727e9e07b76685a338b1271f177955fd707c1620
MD5 63cc5f12f312ed416f6580df9ad6c7f2
BLAKE2b-256 3041e6185056792222f9bd8352ebcb96142684c487de84d314b15fbfc0dcd44e

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