Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/theskumar/python-dotenv
/ functions
Functions
124 in github.com/theskumar/python-dotenv
⨍
Functions
124
◇
Types & classes
10
↳
Endpoints
11
↓ 13 callers
Method
read
(self, count: int)
src/dotenv/parser.py:83
↓ 6 callers
Method
dotenv
(self, line)
src/dotenv/ipython.py:23
↓ 4 callers
Method
dict
Return dotenv as dict
src/dotenv/main.py:67
↓ 4 callers
Function
parse_stream
(stream: IO[str])
src/dotenv/parser.py:172
↓ 4 callers
Method
read_regex
(self, regex: Pattern[str])
src/dotenv/parser.py:90
↓ 3 callers
Function
dotenv_values
Parse a .env file and return its content as a dict. The returned dict will have `None` values for keys without values in the .env file.
src/dotenv/main.py:349
↓ 3 callers
Function
find_dotenv
Search in increasingly higher folders for the given file Returns path to the file if found, or an empty string otherwise
src/dotenv/main.py:270
↓ 3 callers
Method
get
src/dotenv/main.py:102
↓ 3 callers
Method
peek
(self, count: int)
src/dotenv/parser.py:80
↓ 3 callers
Function
prepare_file_hierarchy
Create a temporary folder structure like the following: test_find_dotenv0/ └── child1 ├── child2 │ └──
tests/test_main.py:202
↓ 3 callers
Function
with_warn_for_invalid_lines
(mappings: Iterator[Binding])
src/dotenv/main.py:24
↓ 2 callers
Method
advance
(self, string: str)
src/dotenv/parser.py:53
↓ 2 callers
Method
has_next
(self)
src/dotenv/parser.py:68
↓ 2 callers
Function
list
Display all the stored key/value.
src/dotenv/cli.py:73
↓ 2 callers
Function
parse_variables
(value: str)
src/dotenv/variables.py:70
↓ 2 callers
Function
rewrite
( path: StrPath, encoding: Optional[str], )
src/dotenv/main.py:130
↓ 2 callers
Method
start
(cls)
src/dotenv/parser.py:46
↓ 2 callers
Function
stream_file
Open a file and yield the corresponding (decoded) stream. Exits with error code 2 if the file cannot be opened.
src/dotenv/cli.py:52
↓ 1 callers
Method
__eq__
(self, other: object)
src/dotenv/variables.py:36
↓ 1 callers
Method
_get_stream
(self)
src/dotenv/main.py:53
↓ 1 callers
Function
_is_interactive
Decide whether this is running in a REPL or IPython notebook
src/dotenv/main.py:281
↓ 1 callers
Function
_walk_to_root
Yield directories starting from the given directory up to the root
src/dotenv/main.py:252
↓ 1 callers
Function
cli
This script is used to set, get or unset values from a .env file.
src/dotenv/cli.py:46
↓ 1 callers
Function
decode_escapes
(regex: Pattern[str], string: str)
src/dotenv/parser.py:98
↓ 1 callers
Method
get_marked
(self)
src/dotenv/parser.py:74
↓ 1 callers
Function
load_dotenv
Parse a .env file and then load all the variables found as environment variables. Parameters: dotenv_path: Absolute or relative path to .
src/dotenv/main.py:311
↓ 1 callers
Function
make_regex
(string: str, extra_flags: int = 0)
src/dotenv/parser.py:7
↓ 1 callers
Method
parse
(self)
src/dotenv/main.py:81
↓ 1 callers
Function
parse_binding
(reader: Reader)
src/dotenv/parser.py:135
↓ 1 callers
Function
parse_key
(reader: Reader)
src/dotenv/parser.py:105
↓ 1 callers
Function
parse_unquoted_value
(reader: Reader)
src/dotenv/parser.py:116
↓ 1 callers
Function
parse_value
(reader: Reader)
src/dotenv/parser.py:121
↓ 1 callers
Function
read_files
(files)
setup.py:4
↓ 1 callers
Method
resolve
(self, env: Mapping[str, Optional[str]])
src/dotenv/variables.py:26
↓ 1 callers
Function
resolve_variables
( values: Iterable[Tuple[str, Optional[str]]], override: bool, )
src/dotenv/main.py:227
↓ 1 callers
Function
run_command
Run command in sub process. Runs the command in a sub process with the variables from `env` added in the current environment variables.
src/dotenv/cli.py:168
↓ 1 callers
Method
set
(self, other: "Position")
src/dotenv/parser.py:49
↓ 1 callers
Method
set_as_environment_variables
Load the current dotenv as system environment variable.
src/dotenv/main.py:87
↓ 1 callers
Function
set_key
Adds or Updates a key/value to the given .env If the .env path given doesn't exist, fails instead of risking creating an orphan .env som
src/dotenv/main.py:147
↓ 1 callers
Method
set_mark
(self)
src/dotenv/parser.py:71
↓ 1 callers
Function
unset_key
Removes a given key from the given `.env` file. If the .env path given doesn't exist, fails. If the given key doesn't exist in the .env,
src/dotenv/main.py:196
Method
__eq__
(self, other: object)
src/dotenv/variables.py:56
Method
__hash__
(self)
src/dotenv/variables.py:41
Method
__hash__
(self)
src/dotenv/variables.py:61
Method
__init__
(self, chars: int, line: int)
src/dotenv/parser.py:41
Method
__init__
(self, stream: IO[str])
src/dotenv/parser.py:63
Method
__init__
(self, value: str)
src/dotenv/variables.py:30
Method
__init__
(self, name: str, default: Optional[str])
src/dotenv/variables.py:49
Method
__init__
( self, dotenv_path: Optional[StrPath], stream: Optional[IO[str]] = None, verb
src/dotenv/main.py:35
Method
__ne__
(self, other: object)
src/dotenv/variables.py:19
Method
__repr__
(self)
src/dotenv/variables.py:33
Method
__repr__
(self)
src/dotenv/variables.py:53
Function
cli
()
tests/conftest.py:6
Function
decode_match
(match: Match[str])
src/dotenv/parser.py:99
Function
dotenv_file
(tmp_path)
tests/conftest.py:13
Function
enumerate_env
Return a path for the ${pwd}/.env file. If pwd does not exist, return None.
src/dotenv/cli.py:20
Function
get
Retrieve the value for the given key.
src/dotenv/cli.py:111
Function
get_cli_string
Returns a string suitable for running as a shell script. Useful for converting a arguments passed to a fabric task to be passed to a `local`
src/dotenv/__init__.py:12
Function
get_key
Get the value of a given key from the given .env. Returns `None` if the key isn't found or doesn't have a value.
src/dotenv/main.py:116
Function
load_ipython_extension
Register the %dotenv magic.
src/dotenv/ipython.py:37
Function
load_ipython_extension
(ipython: Any)
src/dotenv/__init__.py:7
Method
resolve
(self, env: Mapping[str, Optional[str]])
src/dotenv/variables.py:44
Method
resolve
(self, env: Mapping[str, Optional[str]])
src/dotenv/variables.py:64
Function
run
Run command with environment variables present.
src/dotenv/cli.py:147
Function
set
Store the given key/value.
src/dotenv/cli.py:96
Function
test_dotenv_values_file
(dotenv_file)
tests/test_main.py:359
Function
test_dotenv_values_file_stream
(dotenv_file)
tests/test_main.py:418
Function
test_dotenv_values_string_io
(env, string, interpolate, expected)
tests/test_main.py:408
Function
test_find_dotenv_found
(tmp_path)
tests/test_main.py:243
Function
test_find_dotenv_no_file_no_raise
(tmp_path)
tests/test_main.py:234
Function
test_find_dotenv_no_file_raise
(tmp_path)
tests/test_main.py:226
Function
test_get_default_path
(tmp_path)
tests/test_cli.py:155
Function
test_get_existing_value
(cli, dotenv_file)
tests/test_cli.py:59
Function
test_get_key_encoding
(dotenv_file)
tests/test_main.py:119
Function
test_get_key_no_file
(tmp_path)
tests/test_main.py:76
Function
test_get_key_none
(dotenv_file)
tests/test_main.py:129
Function
test_get_key_not_found
(dotenv_file)
tests/test_main.py:97
Function
test_get_key_ok
(dotenv_file)
tests/test_main.py:107
Function
test_get_non_existent_file
(cli)
tests/test_cli.py:74
Function
test_get_non_existent_value
(cli, dotenv_file)
tests/test_cli.py:68
Function
test_get_not_a_file
(cli)
tests/test_cli.py:81
Function
test_ipython_existing_variable_no_override
(tmp_path)
tests/test_ipython.py:11
Function
test_ipython_existing_variable_override
(tmp_path)
tests/test_ipython.py:27
Function
test_ipython_new_variable
(tmp_path)
tests/test_ipython.py:43
Function
test_list
(cli, dotenv_file, format: Optional[str], content: str, expected: str)
tests/test_cli.py:26
Function
test_list_no_file
(cli)
tests/test_cli.py:53
Function
test_list_non_existent_file
(cli)
tests/test_cli.py:39
Function
test_list_not_a_file
(cli)
tests/test_cli.py:46
Function
test_load_dotenv_existing_file
(dotenv_file)
tests/test_main.py:255
Function
test_load_dotenv_existing_variable_no_override
(dotenv_file)
tests/test_main.py:276
Function
test_load_dotenv_existing_variable_override
(dotenv_file)
tests/test_main.py:287
Function
test_load_dotenv_file_stream
(dotenv_file)
tests/test_main.py:330
Function
test_load_dotenv_in_current_dir
(tmp_path)
tests/test_main.py:341
Function
test_load_dotenv_no_file_verbose
()
tests/test_main.py:265
Function
test_load_dotenv_redefine_var_used_in_file_no_override
(dotenv_file)
tests/test_main.py:298
Function
test_load_dotenv_redefine_var_used_in_file_with_override
(dotenv_file)
tests/test_main.py:309
Function
test_load_dotenv_string_io_utf_8
()
tests/test_main.py:320
Function
test_parse_stream
(test_input, expected)
tests/test_parser.py:168
Function
test_parse_variables
(value, expected)
tests/test_variables.py:32
Function
test_run
(tmp_path)
tests/test_cli.py:165
next →
1–100 of 124, ranked by callers