cli

_get_parser

edotenv.cli._get_parser()[source]

Builds an argparse parser for the edotenv command line tool.

Returns

An argparse parser for edotenv.

Return type

argparse.ArgumentParser

Example

from edotenv.cli import _get_parser
parser = _get_parser()
parser.print_help()

run

edotenv.cli.run()[source]

Runs the edotenv command.

Example

>>> edotenv --help
usage: ipykernel_launcher.py [-h] {encrypt,decrypt,clear} ...

Manages encrypted .env files

optional arguments:
  -h, --help            show this help message and exit

commands:
  {encrypt,decrypt,clear}
    encrypt             encrypt a .env file
    decrypt             decrypt an encrypted .env file
    clear               clear encrypted .env or key file

Encrypt .env file:

>>> edotenv encrypt .env .env.encrypted

Decrypt .env file:

>>> edotenv decrypt .env .env.encrypted

Clear encrypted .env and key files:

>>> edotenv clear --edotenv_path .env