MCPcopy Index your code
hub / github.com/theskumar/python-dotenv / set_value

Function set_value

src/dotenv/cli.py:116–131  ·  view source on GitHub ↗

Store the given key/value. This doesn't follow symlinks, to avoid accidentally modifying a file at a potentially untrusted path.

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

Source from the content-addressed store, hash-verified

114@click.argument("key", required=True)
115@click.argument("value", required=True)
116def set_value(ctx: click.Context, key: Any, value: Any) -> None:
117 """
118 Store the given key/value.
119
120 This doesn't follow symlinks, to avoid accidentally modifying a file at a
121 potentially untrusted path.
122 """
123
124 file = ctx.obj["FILE"]
125 quote = ctx.obj["QUOTE"]
126 export = ctx.obj["EXPORT"]
127 success, key, value = set_key(file, key, value, quote, export)
128 if success:
129 click.echo(f"{key}={value}")
130 else:
131 sys.exit(1)
132
133
134@cli.command()

Callers

nothing calls this directly

Calls 1

set_keyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…