Skip to main content
Made with pop, a Python implementation of Plugin Oriented Programming Made with Python

idemenv is an Idem binary installation and management tool, inspired by tfenv

About

idemenv allows users to easily install multiple idem binaries built with tiamat. This is useful for switching between idem configuration code bases written for different idem versions.

idemenv is built as a POP application, which allows it to leverage other POP plugins in the ecosystem or plug into other applications as necessary.

What is POP?

This project is built with pop, a Python-based implementation of Plugin Oriented Programming (POP). POP seeks to bring together concepts and wisdom from the history of computing in new ways to solve modern computing problems.

For more information:

Getting Started

Prerequisites

  • Python 3.7+

  • git (if installing from source, or contributing to the project)

Installation

If wanting to use idemenv, you can do so by either installing from PyPI or from source.

Install from PyPI

pip install idemenv

Install from source

# clone repo
git clone git@github.com/eitrtechnologies/idemenv.git
cd idemenv

# Setup venv
python3 -m venv .venv --prompt idemenv
source .venv/bin/activate
pip install -e .

Usage

usage: run.py [-h] [--config CONFIG] [--config-template] [--log-datefmt LOG_DATEFMT] [--log-file LOG_FILE] [--log-fmt-console LOG_FMT_CONSOLE]
           [--log-fmt-logfile LOG_FMT_LOGFILE] [--log-handler-options [LOG_HANDLER_OPTIONS ...]] [--log-level LOG_LEVEL] [--log-plugin LOG_PLUGIN] [--repo-url REPO_URL]
           [--idemenv-dir SALTENV_DIR] [--version]
           {init,install,list,list-remote,pin,uninstall,use,version} ...

positional arguments:
  {init,install,list,list-remote,pin,uninstall,use,version}

options:
  -h, --help            show this help message and exit
  --config CONFIG, -c CONFIG
                        Load extra options from a configuration file onto hub.OPT.idemenv
  --config-template     Output a config template for this command
  --repo-url REPO_URL, -r REPO_URL
                        Idem single binary repository location. Version directories are expected here.
  --idemenv-dir IDEMENV_DIR, -d IDEMENV_DIR
                        Working directory for idemenv downloads
  --version             Display version information

Logging Options:
  --log-datefmt LOG_DATEFMT
                        The date format to display in the logs
  --log-file LOG_FILE   The location of the log file
  --log-fmt-console LOG_FMT_CONSOLE
                        The log formatting used in the console
  --log-fmt-logfile LOG_FMT_LOGFILE
                        The format to be given to log file messages
  --log-handler-options [LOG_HANDLER_OPTIONS ...]
                        kwargs that should be passed to the logging handler used by the log_plugin
  --log-level LOG_LEVEL
                        Set the log level, either quiet, info, warning, debug or error
  --log-plugin LOG_PLUGIN
                        The logging plugin to use

Examples

Basic idem binary setup:

# Example CLI commands


# List remote versions

$ idemenv list-remote
3004rc1
3004
3003.3
3003


# Install latest version

$ idemenv install latest
Processing tarball...


# Use latest version

$ idemenv use latest


# List local versions

$ idemenv list
* 3004 set by /home/nmhughes/.idemenv/version
  3003.3
  3003


# Initialize the idemenv environment, which will point to the idem binaries

$ idemenv init
Add the idemenv bin directory to your PATH:

    echo 'export PATH="$HOME/.idemenv/bin:$PATH"' >> ~/.bashrc
OR:
    echo 'export PATH="$HOME/.idemenv/bin:$PATH"' >> ~/.zshrc

$ echo 'export PATH="$HOME/.idemenv/bin:$PATH"' >> ~/.zshrc
$ source ~/.zshrc


# Kick the tires!

$ idem exec test.version
local:
    3004

Common Issues

  • If this error is encountered, you might be running on Arch and need to install the libxcrypt-compat package.

[230732] Error loading Python lib '/tmp/_MEIAEr7dd/libpython3.7m.so.1.0': dlopen: libcrypt.so.1: cannot open shared object file: No such file or directory

Roadmap

Reference the open issues for a list of proposed features (and known issues).

Acknowledgements

Release files for idemenv 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for idemenv 0.2.0
File Size Uploaded
idemenv-0.2.0.tar.gz 14.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for idemenv 0.2.0
File Interpreter ABI Platform
idemenv-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 27.1 kB

Release files / idemenv-0.2.0.tar.gz

Download URL idemenv-0.2.0.tar.gz
Size 14.2 kB
Tags Source
SHA-256 checksum
How to use checksums
77834902897106b11773e010e9c61da49a22db9e3a576c5561d2bc902314ffc8
BLAKE2b-256 checksum
How to use checksums
b86a14ddaa50f8a10a1115475b89b5191090857cbe21e96251a5ee32af551bf7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.5

Release files / idemenv-0.2.0-py3-none-any.whl

Download URL idemenv-0.2.0-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0f422229d0dbbdee4991b16f1a48750e907dd93fd804f5f28ddfc6dfe805a206
BLAKE2b-256 checksum
How to use checksums
ba0f706d676a4a01dda8f3342fd76cc945429db12e9dae17ffd3d9aa85401f82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.5

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page