2 unstable releases

0.2.0 Nov 14, 2021
0.1.0 Mar 20, 2020

#623 in Configuration

Download history 25/week @ 2024-11-29 50/week @ 2024-12-06 43/week @ 2024-12-13 13/week @ 2024-12-20 5/week @ 2024-12-27 18/week @ 2025-01-03 60/week @ 2025-01-10 43/week @ 2025-01-17 18/week @ 2025-01-24 30/week @ 2025-01-31 66/week @ 2025-02-07 68/week @ 2025-02-14 46/week @ 2025-02-21 50/week @ 2025-02-28 512/week @ 2025-03-07 877/week @ 2025-03-14

1,488 downloads per month
Used in 8 crates (3 directly)

0BSD license

7KB
93 lines

simple_env_load

Documentation Crates Actions

A simple .env file loader

Description

Giving a sequence of env files from most general to most specific.

Operation

Parse each file for key val remove any comments blank lines and extra whitespace.

Syntax

TEST_DATA=bar       # spaces are optional
## this is a comment
TEST_baz = "baz"    # double quotes are removed
## above line was left intentionally blank

will produce:

Key Value
TEST_DATA bar
TEST_baz baz

License: 0BSD


lib.rs:

A simple .env file loader

Description

Giving a sequence of env files from most general to most specific.

Operation

Parse each file for key val remove any comments blank lines and extra whitespace.

Syntax

TEST_DATA=bar       # spaces are optional
## this is a comment
TEST_BAZ = "baz"    # double quotes are removed
TEST_BAR = 'bar'    # single quotes are removed
## above line was left intentionally blank

will produce:

Key Value
TEST_DATA bar
TEST_BAZ baz
TEST_BAR bar

No runtime deps