Python-dotenv reads key-value pairs from a .env file and can set them as environment variables.

Overview

python-dotenv

Build Status PyPI version

Python-dotenv reads key-value pairs from a .env file and can set them as environment variables. It helps in the development of applications following the 12-factor principles.

Getting Started

pip install python-dotenv

If your application takes its configuration from environment variables, like a 12-factor application, launching it in development is not very practical because you have to set those environment variables yourself.

To help you with that, you can add Python-dotenv to your application to make it load the configuration from a .env file when it is present (e.g. in development) while remaining configurable via the environment:

from dotenv import load_dotenv

load_dotenv()  # take environment variables from .env.

# Code of your application, which uses environment variables (e.g. from `os.environ` or
# `os.getenv`) as if they came from the actual environment.

By default, load_dotenv doesn't override existing environment variables.

To configure the development environment, add a .env in the root directory of your project:

.
├── .env
└── foo.py

The syntax of .env files supported by python-dotenv is similar to that of Bash:

# Development settings
DOMAIN=example.org
ADMIN_EMAIL=admin@${DOMAIN}
ROOT_URL=${DOMAIN}/app

If you use variables in values, ensure they are surrounded with { and }, like ${DOMAIN}, as bare variables such as $DOMAIN are not expanded.

You will probably want to add .env to your .gitignore, especially if it contains secrets like a password.

See the section "File format" below for more information about what you can write in a .env file.

Other Use Cases

Load configuration without altering the environment

The function dotenv_values works more or less the same way as load_dotenv, except it doesn't touch the environment, it just returns a dict with the values parsed from the .env file.

from dotenv import dotenv_values

config = dotenv_values(".env")  # config = {"USER": "foo", "EMAIL": "[email protected]"}

This notably enables advanced configuration management:

import os
from dotenv import dotenv_values

config = {
    **dotenv_values(".env.shared"),  # load shared development variables
    **dotenv_values(".env.secret"),  # load sensitive variables
    **os.environ,  # override loaded values with environment variables
}

Parse configuration as a stream

load_dotenv and dotenv_values accept streams via their stream argument. It is thus possible to load the variables from sources other than the filesystem (e.g. the network).

from io import StringIO

from dotenv import load_dotenv

config = StringIO("USER=foo\n[email protected]")
load_dotenv(stream=config)

Load .env files in IPython

You can use dotenv in IPython. By default, it will use find_dotenv to search for a .env file:

%load_ext dotenv
%dotenv

You can also specify a path:

%dotenv relative/or/absolute/path/to/.env

Optional flags:

  • -o to override existing variables.
  • -v for increased verbosity.

Command-line Interface

A CLI interface dotenv is also included, which helps you manipulate the .env file without manually opening it.

$ pip install "python-dotenv[cli]"
$ dotenv set USER foo
$ dotenv set EMAIL [email protected]
$ dotenv list
USER=foo
[email protected]
$ dotenv run -- python foo.py

Run dotenv --help for more information about the options and subcommands.

File format

The format is not formally specified and still improves over time. That being said, .env files should mostly look like Bash files.

Keys can be unquoted or single-quoted. Values can be unquoted, single- or double-quoted. Spaces before and after keys, equal signs, and values are ignored. Values can be followed by a comment. Lines can start with the export directive, which has no effect on their interpretation.

Allowed escape sequences:

  • in single-quoted values: \\, \'
  • in double-quoted values: \\, \', \", \a, \b, \f, \n, \r, \t, \v

Multiline values

It is possible for single- or double-quoted values to span multiple lines. The following examples are equivalent:

FOO="first line
second line"
FOO="first line\nsecond line"

Variable expansion

Python-dotenv can interpolate variables using POSIX variable expansion.

With load_dotenv(override=True) or dotenv_values(), the value of a variable is the first of the values defined in the following list:

  • Value of that variable in the .env file.
  • Value of that variable in the environment.
  • Default value, if provided.
  • Empty string.

With load_dotenv(override=False), the value of a variable is the first of the values defined in the following list:

  • Value of that variable in the environment.
  • Value of that variable in the .env file.
  • Default value, if provided.
  • Empty string.

Related Projects

Acknowledgements

This project is currently maintained by Saurabh Kumar and Bertrand Bonnefoy-Claudet and would not have been possible without the support of these awesome people.

Comments
  • Multiline value not working as expected, better doc example needed

    Multiline value not working as expected, better doc example needed

    I have this .env file

    CLOUDKARAFKA_CA="-----BEGIN CERTIFICATE-----
    MIIDAzCCAeugAwIBAgIJAL7UBqvWBRglMA0GCSqGSIb3DQEBCwUAMBgxFjAUBgNV
    someMoreLines
    +HPBLZVg3o4jtzOJJNnaGCAcAHsm6PkqBhTUhM113r8MWlsR6eAIhIVtdRAxmjaw
    6f7ARs8C8A==
    -----END CERTIFICATE-----
    "
    CLOUDKARAFKA_CERT="-----BEGIN CERTIFICATE-----
    MIICpzCCAY8CCQCA4JIEmpl1oTANBgkqhkiG9w0BAQsFADAYMRYwFAYDVQQDDA12
    someMoreLines
    SSgZPE8qiN/jucTdLSLRQ0igohq4EnAg8QHXReX2oIlSZb7i8wxCqK/T+9WU0+vB
    ToJ+bM0OCJ4d22I=
    -----END CERTIFICATE-----
    "
    CLOUDKARAFKA_TOPIC_PREFIX="aj9g740d-"
    CLOUDKARAFKA_BROKERS="velomobile-02.srvs.cloudkafka.com:9094,velomobile-01.srvs.cloudkafka.com:9094,velomobile-03.srvs.cloudkafka.com:9094"
    
    

    When I use this .env file, the CLOUDKARAFKA_CA and CLOUDKARAFKA_CERT key are both "-----BEGIN CERTIFICATE-----"

    image

    Notice the extra ", Am I doing something wrong, please help

    opened by itaditya 21
  • Variable not found (

    Variable not found ("None" returned) on a Mac

    Hi, we are using dotenv for a project and are getting strange behavior.

    While the environment variable is working just fine on a Windows machine, it is not able to read at all on a Mac. It returns "None" even though the variable is clearly there. There seem to be no other issues.

    In X.py file:

    from dotenv import load_dotenv
    load_dotenv()
    import os
    HOME_PATH = os.getenv("SQUABBLE_HOME_PATH")
    

    In .env file:

    SQUABBLE_HOME_PATH = '/path/to/squabble_runner/'
    

    While running:

    Traceback (most recent call last):
      File "XXXX/X.py", line 27, in controversy_score
        input_file_path = HOME_PATH + 'lib/squabble_input.txt'
    TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
    

    This is on Sierra, Python 3.6.2.

    As mentioned above, the same code runs just fine on a PC. Any help would be appreciated!

    opened by shirki 18
  • add-run-command

    add-run-command

    I think it would be neat if the dotenv cli tool had an option to run a given commandline WITH the environment vars sourced from specified file, like a RUNNER.

    # using the env command to print out env
    echo "foo=bar" > .env
    $ dotenv -f .env env 
    foo=bar
    
    opened by sloev 16
  • Wrong parsing of env variables in single quotes

    Wrong parsing of env variables in single quotes

    I have the following .env file:

    DATABASE_URL='postgres://localhost:5432/myapp_development'
    

    When I run dotenv get DATABASE_URL this is what I get: DATABASE_URL="'postgres://localhost:5432/simulator_development'"

    When I try to use this with dj-database-url it is failing to parse the DATABASE_URL environment variable as it is. It seems using single quotes in the .env file is causing this.

    It would be nice if this were documented somewhere if the behavior is intended I spent quite a bit of time trying to figure out where the error was. Thanks 😃

    bug 
    opened by kevgathuku 15
  • Add POSIX default value support on vars

    Add POSIX default value support on vars

    This PR considers POSIX default values on variables with this, the following tests are now possible:

    # Undefined with default value
    ({}, "a=${b:-DEFAULT_VALUE}", False, {"a": "${b:-DEFAULT_VALUE}"}),
    ({}, "a=${b:-DEFAULT_VALUE}", True, {"a": "DEFAULT_VALUE"}),
    ({"b": "c"}, "a=${b:-DEFAULT_VALUE}", False, {"a": "${b:-DEFAULT_VALUE}"}),
    ({"b": "c"}, "a=${b:-DEFAULT_VALUE}", True, {"a": "c"}),
    

    Note that this PR depends on https://github.com/theskumar/python-dotenv/pull/241 being merged before to pass the CI

    opened by ulyssessouza 14
  • Dotenv overrides existing env variables

    Dotenv overrides existing env variables

    Common behavior of dotenv packages is not overriding existing environment variables. .env by default. env should not write over existing variables or at least provide an option to avoid overriding:

    Examples of the common behavior Go: https://github.com/joho/godotenv/blob/master/godotenv_test.go#L122 Ruby: https://github.com/bkeepers/dotenv/blob/master/spec/dotenv/environment_spec.rb#L25 Haskell: https://github.com/stackbuilders/dotenv-hs/blob/master/spec/Configuration/DotenvSpec.hs#L21 Clojure: https://github.com/tpope/lein-dotenv/blob/master/test/lein_dotenv/plugin_test.clj#L11

    Why does this implementation work differently?

    opened by jsantos17 13
  • Moved package into src folder and added tox for testing

    Moved package into src folder and added tox for testing

    In order to replicate issue #130 for testing purposes I had to run the tests against an installed version of dotenv on Python 2.7. I did this via moving the package into a src directory and use of tox (admittedly because that is the tool I'm familiar with).

    I did not change how Travis-CI runs tests but can work on that if there is traction for this change (relatedly, the combined coverage isn't working at the moment either).

    Here's some other argument and background for using a src directory:

    • https://hynek.me/articles/testing-packaging/
    • https://blog.ionelmc.ro/2014/05/25/python-packaging/
    opened by smsearcy 12
  • WIP: Added support for calling arbitrary script with .env variables provided

    WIP: Added support for calling arbitrary script with .env variables provided

    Hi,

    I've started working on a feature that'll allow to use the CLI like this:

    $ dotenv foo
    

    which will parse the .env file and calls foo in a subprocess with the environment variables from .env merged with the ones from os.environ. This is similar to the behavior of ruby-dotenv.

    For now everything is in dotenv/__main__ so you could easily add another console_script in setup.py. I've stopped here as I think it would probably better to merge it in the existing dotenv script, however I think the default action should be as described above, and the existing options from the dotenv script should be optional. Please let me know what you think and if and how to proceed.

    opened by venthur 12
  • Add support for newlines, backslashes, trailing comments and unquoted UTF-8

    Add support for newlines, backslashes, trailing comments and unquoted UTF-8

    This adds support for:

    • multiline values (i.e. containing newlines or escaped \n), fixes #89
    • backslashes in values, fixes #112
    • trailing comments, fixes #141
    • UTF-8 in unquoted values, fixes #147

    This supersedes a previous pull-request, #142, which would add support for multiline values in Dotenv.parse but not in the CLI (dotenv get and dotenv set).

    The internal change is significant but I have added a lot of test cases to reduce the risk of breaking anything. Previous test cases are still present, so I wouldn't expect any major backward incompatibility.

    I have written detailed commit messages and made my code as clear as possible. Let me know if anything should be improved. I'll be happy to fix anything unsatisfactory.

    enhancement help wanted 
    opened by bbc2 11
  • Does not load from current directory

    Does not load from current directory

    The README states (emphasis mine)

    The easiest and most common usage consists on calling load_dotenv when the application starts, which will load environment variables from a file named .env in the current directory

    I'm not finding this to be the case. load_dotenv defaults to calling find_dotenv():

    https://github.com/theskumar/python-dotenv/blob/b20d818c9296817352f5d0d7cb7b8acd90a2548d/dotenv/main.py#L249-L251

    but usecwd defaults to False:

    https://github.com/theskumar/python-dotenv/blob/b20d818c9296817352f5d0d7cb7b8acd90a2548d/dotenv/main.py#L224-L246

    In my case, path becomes '<venv path>/lib/python3.6/site-packages/dotenv' on line 236 so the current directory is never traversed.

    opened by RazerM 11
  • UnicodeDecodeError exception occurs when .env file contains Non-ASCII characters on Windows

    UnicodeDecodeError exception occurs when .env file contains Non-ASCII characters on Windows

    Similar to Issue #175 UnicodeDecodeError exception occurs when .env file contains Non-ASCII characters on Windows.
    And that issue said it sloved in PR 161 30 Apr 2019, but it did happen in the version 0.15.0 which released on 29 Oct 2020.
    Similar situation I met before about decode on windows

    Info about env

    OS like

    • windows 10 amd64
    • python 3.9.0

    pip package info

    Package       Version
    ------------- -------
    click         7.1.2
    Flask         1.1.2
    itsdangerous  1.1.0
    Jinja2        2.11.2
    MarkupSafe    1.1.1
    pip           20.3.3
    python-dotenv 0.15.0
    setuptools    51.3.3
    watchdog      1.0.2
    Werkzeug      1.0.1
    wheel         0.36.2
    

    what situation will error

    code

    see rpo

    point

    When I add a little Chinese comment in file - .flaskenv, it will happen. If delete all Chinese comment, it work fine.

    bad result

    add a comment to the end of .flaskenv. Just like this

    # -*- encoding: utf-8 -*-
    # Public env Variables about flask
    
    # FLASK_APP = app.py
    # FLASK_RUN_HOST = 127.0.0.1
    FLASK_RUN_PORT = 80
    
    # dev mode 
    FLASK_ENV = development
    # 今天也是个小可爱耶
    

    Then run flask

    PS D:\Documents\CAU\Lion\repositiries\Python\fb> flask run
    Traceback (most recent call last):
      File "d:\program files\python\python39\lib\runpy.py", line 197, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "d:\program files\python\python39\lib\runpy.py", line 87, in _run_code
        exec(code, run_globals)
      File "c:\users\kearney\.virtualenvs\fb-xzc3iotr\lib\site-packages\flask\cli.py", line 967, in main
        cli.main(args=sys.argv[1:], prog_name="python -m flask" if as_module else None)
      File "c:\users\kearney\.virtualenvs\fb-xzc3iotr\lib\site-packages\flask\cli.py", line 575, in main
        load_dotenv()
      File "c:\users\kearney\.virtualenvs\fb-xzc3iotr\lib\site-packages\flask\cli.py", line 649, in load_dotenv
        dotenv.load_dotenv(path)
      File "c:\users\kearney\.virtualenvs\fb-xzc3iotr\lib\site-packages\dotenv\main.py", line 319, in load_dotenv
        return DotEnv(f, verbose=verbose, interpolate=interpolate, **kwargs).set_as_environment_variables(override=override)
      File "c:\users\kearney\.virtualenvs\fb-xzc3iotr\lib\site-packages\dotenv\main.py", line 106, in set_as_environment_variables
        for k, v in self.dict().items():
      File "c:\users\kearney\.virtualenvs\fb-xzc3iotr\lib\site-packages\dotenv\main.py", line 87, in dict
        values = resolve_nested_variables(self.parse())
      File "c:\users\kearney\.virtualenvs\fb-xzc3iotr\lib\site-packages\dotenv\main.py", line 239, in resolve_nested_variables
        for (k, v) in values:
      File "c:\users\kearney\.virtualenvs\fb-xzc3iotr\lib\site-packages\dotenv\main.py", line 97, in parse
        for mapping in with_warn_for_invalid_lines(parse_stream(stream)):
      File "c:\users\kearney\.virtualenvs\fb-xzc3iotr\lib\site-packages\dotenv\main.py", line 48, in with_warn_for_invalid_lines
        for mapping in mappings:
      File "c:\users\kearney\.virtualenvs\fb-xzc3iotr\lib\site-packages\dotenv\parser.py", line 229, in parse_stream
        reader = Reader(stream)
      File "c:\users\kearney\.virtualenvs\fb-xzc3iotr\lib\site-packages\dotenv\parser.py", line 107, in __init__
        self.string = stream.read()
    UnicodeDecodeError: 'gbk' codec can't decode byte 0xaa in position 194: illegal multibyte sequence
    

    good reslut

    PS D:\Documents\CAU\Lion\repositiries\Python\fb> flask run
     * Environment: development
     * Debug mode: on
     * Restarting with windowsapi reloader
     * Debugger is active!
     * Debugger PIN: 139-670-554
     * Running on http://127.0.0.1:80/ (Press CTRL+C to quit)
    
    opened by BackMountainDevil 10
  • dotenv run is overriding existing environment variables

    dotenv run is overriding existing environment variables

    From the README:

    By default, load_dotenv doesn't override existing environment variables.

    The contents of .env:

    FOO=BAZ
    

    Example:

    $ dotenv --version
    dotenv, version 0.21.0
    
    $ printenv FOO
    BAR
    
    $ dotenv run printenv FOO
    BAZ
    

    Is this expected? Thanks

    opened by sourcedelica 2
  • pyright in strict mode errors on `from dotenv import load_dotenv`

    pyright in strict mode errors on `from dotenv import load_dotenv`

    Steps to reproduce:

    $ python --version
    Python 3.9.13
    $ mkdir repro
    $ cd repro
    $ cat > repro.py <<EOL
    from dotenv import load_dotenv
    load_dotenv()
    EOL
    $ echo '{ "typeCheckingMode": "strict" }' > pyrightconfig.json
    $ python -m venv .venv
    $ source .venv/bin/activate
    $ pip install pyright python-dotenv
    Collecting pyright
      Using cached pyright-1.1.276-py3-none-any.whl (16 kB)
    Collecting python-dotenv
      Using cached python_dotenv-0.21.0-py3-none-any.whl (18 kB)
    Collecting nodeenv>=1.6.0
      Using cached nodeenv-1.7.0-py2.py3-none-any.whl (21 kB)
    Requirement already satisfied: setuptools in ./.venv/lib/python3.10/site-packages (from nodeenv>=1.6.0->pyright) (58.1.0)
    Installing collected packages: python-dotenv, nodeenv, pyright
    Successfully installed nodeenv-1.7.0 pyright-1.1.276 python-dotenv-0.21.0
    $ pyright repro.py
    Loading configuration file at /Users/eaftan/repro/pyrightconfig.json
    Assuming Python version 3.9
    Assuming Python platform Darwin
    Auto-excluding **/node_modules
    Auto-excluding **/__pycache__
    Auto-excluding **/.*
    stubPath /Users/eaftan/repro/typings is not a valid directory.
    Searching for source files
    Found 1 source file
    pyright 1.1.276
    /Users/eaftan/repro/repro.py
      /Users/eaftan/repro/repro.py:1:20 - error: Type of "load_dotenv" is partially unknown
        Type of "load_dotenv" is "(dotenv_path: str | PathLike[Unknown] | None = None, stream: IO[str] | None = None, verbose: bool = False, override: bool = False, interpolate: bool = True, encoding: str | None = "utf-8") -> bool" (reportUnknownVariableType)
    1 error, 0 warnings, 0 informations 
    Completed in 0.579sec
    

    I think the problem is that load_dotenv is typed as follows:

    def load_dotenv(
        dotenv_path: Union[str, os.PathLike, None] = None,
        stream: Optional[IO[str]] = None,
        verbose: bool = False,
        override: bool = False,
        interpolate: bool = True,
        encoding: Optional[str] = "utf-8",
    ) -> bool:
    

    os.PathLike is a generic type and should have a type argument. I think the correct typing for dotenv_path should be Union[str, os.PathLike[str], os.PathLike[bytes], None].

    opened by eaftan 0
  • dotenv_values vs load_dotenv oddity

    dotenv_values vs load_dotenv oddity

    I set up a Django settings.py file to load RSA keys from a file into a dict with dotenv_values():

    key_config = dotenv_values("path/to/file")

    my_key = key_config['my_key'] my_key_id = key_config['my_key_id']

    It worked fine in my original testing, but the next day it stopped working. I changed to using load_dotenv("path/to/file") and just having 'my_key' and 'my_key_id' as environment variables. That worked fine (and continues to work). I could not find any code changes and the file with my RSA keys remained the same in both instances.

    Is there something that might have caused this behavior, or am I (likely) not seeing a change/typo in my code?

    Thanks--

    Al

    opened by algaspar 1
  • path ...\v2 turns to ...\x0b2

    path ...\v2 turns to ...\x0b2

    I have an .env file which has something like: PYTHONPATH="C:\Users\xyz\v2"

    If I run the python file:

    from dotenv import dotenv_values
    config = dotenv_values(".env")
    print(config)
    

    it gives me: OrderedDict([('PYTHONPATH', 'C:\\Users\\xyz\x0b2')]) instead of expected: OrderedDict([('PYTHONPATH', 'C:\\Users\\xyz\\v2')])

    If I instead have a big V2 it works as expected. It seems a small v2 (version 2) in the path name seems to create some issues.

    opened by TiDiCom 1
Releases(v0.21.0)
  • v0.21.0(Sep 3, 2022)

    What's Changed

    Added

    • CLI: add support for invocations via 'python -m'. (#395 by @theskumar)
    • load_dotenv function now returns False. (#388 by @larsks)
    • CLI: add --format= option to list command. (#407 by @sammck)

    Fixed

    • Drop Python 3.5 and 3.6 and upgrade GA (#393 by @eggplants)
    • Use open instead of io.open. (#389 by @rabinadk1)
    • Improve documentation for variables without a value (#390 by @bbc2)
    • Add parse_it to Related Projects by (#410 by @naorlivne)
    • Update README.md by (#415 by @harveer07)
    • Improve documentation with direct use of MkDocs by (#398 by @bbc2)

    New Contributors

    • @rabinadk1 made their first contribution in https://github.com/theskumar/python-dotenv/pull/389
    • @larsks made their first contribution in https://github.com/theskumar/python-dotenv/pull/388
    • @naorlivne made their first contribution in https://github.com/theskumar/python-dotenv/pull/410
    • @eggplants made their first contribution in https://github.com/theskumar/python-dotenv/pull/393
    • @sammck made their first contribution in https://github.com/theskumar/python-dotenv/pull/407
    • @harveer07 made their first contribution in https://github.com/theskumar/python-dotenv/pull/415
    • @theGOTOguy made their first contribution in https://github.com/theskumar/python-dotenv/pull/414

    Full Changelog: https://github.com/theskumar/python-dotenv/compare/v0.20.0...v0.21.0

    Source code(tar.gz)
    Source code(zip)
  • v0.19.2(Nov 11, 2021)

    What's Changed

    Fixed

    • Add missing trailing newline before adding new entry with set_key by @bbc2 in https://github.com/theskumar/python-dotenv/pull/361

    Full Changelog: https://github.com/theskumar/python-dotenv/compare/v0.19.1...v0.19.2

    Source code(tar.gz)
    Source code(zip)
  • v0.19.1(Oct 9, 2021)

    What's Changed

    • CHANGELOG.md: Fix typos discovered by codespell by @cclauss in https://github.com/theskumar/python-dotenv/pull/350
    • Add Python 3.10 support by @theskumar in https://github.com/theskumar/python-dotenv/pull/359

    New Contributors

    • @cclauss made their first contribution in https://github.com/theskumar/python-dotenv/pull/350

    Full Changelog: https://github.com/theskumar/python-dotenv/compare/v0.19.0...v0.19.1

    Source code(tar.gz)
    Source code(zip)
  • v0.19.0(Jul 24, 2021)

    Changed

    • Require Python 3.5 or a later version. Python 2 and 3.4 are no longer supported. (#341 by @bbc2).

    Added

    • The dotenv_path argument of set_key and unset_key now has a type of Union[str, os.PathLike] instead of just os.PathLike (#347 by @bbc2).
    • The stream argument of load_dotenv and dotenv_values can now be a text stream (IO[str]), which includes values like io.StringIO("foo") and open("file.env", "r") (#348 by @bbc2).
    Source code(tar.gz)
    Source code(zip)
  • v0.18.0(Jun 20, 2021)

    Changed

    • Raise ValueError if quote_mode isn't one of always, auto or never in set_key (#330 by @bbc2).
    • When writing a value to a .env file with set_key or dotenv set <key> <value> (#330 by @bbc2):
      • Use single quotes instead of double quotes.
      • Don't strip surrounding quotes.
      • In auto mode, don't add quotes if the value is only made of alphanumeric characters (as determined by string.isalnum).
    Source code(tar.gz)
    Source code(zip)
  • v0.17.1(Apr 29, 2021)

  • v0.17.0(Apr 2, 2021)

    Changed

    • Make dotenv get <key> only show the value, not key=value (#313 by @bbc2).

    Added

    • Add --override/--no-override option to dotenv run (#312 by @zueve and @bbc2).
    Source code(tar.gz)
    Source code(zip)
  • v0.16.0(Mar 27, 2021)

    Changed

    • The default value of the encoding parameter for load_dotenv and dotenv_values is now "utf-8" instead of None (#306 by @bbc2).
    • Fix resolution order in variable expansion with override=False (#287 by @bbc2).
    Source code(tar.gz)
    Source code(zip)
Owner
Saurabh Kumar
Director of Web Engineering @Fueled, Mentor, and open source contributor.
Saurabh Kumar
Simple dataclasses configuration management for Python with hocon/json/yaml/properties/env-vars/dict support.

Simple dataclasses configuration management for Python with hocon/json/yaml/properties/env-vars/dict support, based on awesome and lightweight pyhocon parsing library.

Teo Stocco 62 Dec 23, 2022
Load Django Settings from Environmental Variables with One Magical Line of Code

DjEnv: Django + Environment Load Django Settings Directly from Environmental Variables features modify django configuration without modifying source c

Daniel J. Dufour 28 Oct 1, 2022
Inject your config variables into methods, so they are as close to usage as possible

Inject your config variables into methods, so they are as close to usage as possible

GDWR 7 Dec 14, 2022
Python YAML Environment (ymlenv) by Problem Fighter Library

In the name of God, the Most Gracious, the Most Merciful. PF-PY-YMLEnv Documentation Install and update using pip: pip install -U PF-PY-YMLEnv Please

Problem Fighter 2 Jan 20, 2022
A set of Python scripts and notebooks to help administer and configure Workforce projects.

Workforce Scripts A set of Python scripts and notebooks to help administer and configure Workforce projects. Notebooks Several example Jupyter noteboo

Esri 75 Sep 9, 2022
Sync any your configuration file to remote. Currently only support gist.

Sync your configuration to remote, such as vimrc. You can use EscSync to manage your configure of editor, shell, etc.

Me1onRind 0 Nov 21, 2022
This Ivy plugin adds support for TOML file headers.

This Ivy plugin adds support for TOML file headers as an alternative to YAML.

Darren Mulholland 1 Nov 9, 2021
Organize Django settings into multiple files and directories. Easily override and modify settings. Use wildcards and optional settings files.

Organize Django settings into multiple files and directories. Easily override and modify settings. Use wildcards in settings file paths and mark setti

Nikita Sobolev 942 Jan 5, 2023
🤫 Easily manage configs and secrets in your Python projects (with CLI support)

Installation pip install confidential How does it work? Confidential manages secrets for your project, using AWS Secrets Manager. First, store a secr

Candid™️ 63 Oct 30, 2022
A Python library to parse PARI/GP configuration and header files

pari-utils A Python library to parse PARI/GP configuration and header files. This is mainly used in the code generation of https://github.com/sagemath

Sage Mathematical Software System 3 Sep 18, 2022
A small example project for efficiently configuring a Python application with YAMLs and the CLI

Hydra Example Project for Python A small example project for efficiently configuring a Python application with YAMLs and the CLI. Why should I care? A

Florian Wilhelm 4 Dec 31, 2022
Python 3+ compatible port of the configobj library

configobj Python 3+ compatible port of the configobj library. Documentation You can find a full manual on how to use ConfigObj at readthedocs. If you

Differently Sized Kittens 288 Dec 14, 2022
Configuration Management for Python ⚙

dynaconf - Configuration Management for Python. Features Inspired by the 12-factor application guide Settings management (default values, validation,

Bruno Rocha 2.8k Jan 6, 2023
Flexible Python configuration system. The last one you will ever need.

OmegaConf Description Project Code quality Docs and support OmegaConf is a hierarchical configuration system, with support for merging configurations

Omry Yadan 1.4k Jan 2, 2023
A modern simfile parsing & editing library for Python 3

A modern simfile parsing & editing library for Python 3

ash garcia 38 Nov 1, 2022
Python Marlin Configurator to make valid configuration files to be used to compile Marlin with.

marlin-configurator Concept originally imagined by The-EG using PowerShell Build Script for Marlin Configurations The purpose of this project is to pa

DevPeeps 2 Oct 9, 2021
Read configuration settings from python configuration files.

Maison Read configuration settings from python configuration files. Motivation When developing a python application, e.g a command-line tool, it can b

null 9 Jan 4, 2023
Scooch Configures Object Oriented Class Hierarchies for python

Scooch Scooch Configures Object Oriented Class Hierarchies for python. A good place to start with Scooch is at the documentation found here. Scooch is

Pandora Media, Inc. 6 Dec 20, 2022
Apt2sbom python package generates SPDX or YAML files

Welcome to apt2sbom This package contains a library and a CLI tool to convert a Ubuntu software package inventory to a software bill of materials. You

Eliot Lear 15 Nov 13, 2022