MCPcopy Create free account
hub / github.com/theskumar/python-dotenv / set

Function set

src/dotenv/cli.py:96–105  ·  view source on GitHub ↗

Store the given key/value.

(ctx: click.Context, key: Any, value: Any)

Source from the content-addressed store, hash-verified

94@click.argument('key', required=True)
95@click.argument('value', required=True)
96def set(ctx: click.Context, key: Any, value: Any) -> None:
97 """Store the given key/value."""
98 file = ctx.obj['FILE']
99 quote = ctx.obj['QUOTE']
100 export = ctx.obj['EXPORT']
101 success, key, value = set_key(file, key, value, quote, export)
102 if success:
103 click.echo(f'{key}={value}')
104 else:
105 exit(1)
106
107
108@cli.command()

Callers

nothing calls this directly

Calls 1

set_keyFunction · 0.85

Tested by

no test coverage detected