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.5.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: evm-fm-python-0.1.5.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.5.tar.gz
Algorithm Hash digest
SHA256 8b43681361bbb2840d8f2258062ede524dbef39580dd8f85064bf85c629157e9
MD5 509a0ad18078e6b6c22e9033cfe85a15
BLAKE2b-256 9ef5cb0949a574cce7c11ef8f169f0c54aac1d944af23eaee90455de5d75292a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: evm_fm_python-0.1.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4dfaabb317e86ddd9ebf20fc0b5d2666c5bbd1bb87253f94539dee59dfd5717a
MD5 52873f5812ffc29313c8ab463c3c6a12
BLAKE2b-256 720a91ee9f41cf7ec2ddfda44da962ae6562680c5663c805b776768d7a7571b2

See more details on using hashes here.

Supported by

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