A utility tool to create .env files

Overview

A utility tool to create .env files

wemake.services test codecov Python Version Docs wemake-python-styleguide

dump-env takes an .env.template file and some optional environmental variables to create a new .env file from these two sources. No external dependencies are used.

Why?

Why do we need such a tool? Well, this tool is very helpful when your CI is building docker (or other) images. Previously we had some complex logic of encrypting and decrypting files, importing secret keys and so on. Now we can just create secret variables for our CI, add some prefix to it, and use dump-env to make our life easier.

Installation

$ pip install dump-env

Quickstart

This quick demo will demonstrate the main and the only purpose of dump-env:

$ dump-env --template=.env.template --prefix='SECRET_ENV_' > .env

This command will:

  1. take .env.template
  2. parse its keys and values
  3. read all the variables from the environment starting with SECRET_ENV_
  4. remove this prefix
  5. mix it all together, environment vars may override ones from the template
  6. sort keys in alphabetic order
  7. dump all the keys and values into the .env file

Advanced Usage

Multiple prefixes

$ dump-env -t .env.template -p 'SECRET_ENV_' -p 'ANOTHER_SECRET_ENV_' > .env

This command will do pretty much the same thing as with one prefix. But, it will replace multiple prefixes. Further prefixes always replace previous ones if they are the same. For example:

$ export SECRET_TOKEN='very secret string'
$ export SECRET_ANSWER='13'
$ export ANOTHER_SECRET_ENV_ANSWER='42'
$ export ANOTHER_SECRET_ENV_VALUE='0'
$ dump-env -p SECRET_ -p ANOTHER_SECRET_ENV_
ANSWER=42
TOKEN=very secret string
VALUE=0

Strict env variables

In case you want to be sure that YOUR_VAR exists in your environment when dumping, you can use --strict flag:

$ dump-env --strict YOUR_VAR -p YOUR_
Missing env vars: YOUR_VAR

Oups! We forgot to create it! Now this will work:

$ export YOUR_VAR='abc'
$ dump-env --strict YOUR_VAR -p YOUR_
VAR=abc

Any number of --strict flags can be provided. No more forgotten template overrides or missing env vars!

Source templates

You can use an env template as a source template by using the -s or --source argument. This will restrict any non-prefixed variables found in the environment to only those already defined in your template.

$ cat template.env
ANSWER=13
TOKEN=very secret string
VALUE=0
$ export ANSWER='42'
$ dump-env --source=template.env
ANSWER=42
TOKEN=very secret string
VALUE=0

You can still also use prefixes to add extra variables from the environment

$ export EXTRA_VAR='foo'
$ dump-env -s template.env -p EXTRA_
ANSWER=13
TOKEN=very secret string
VALUE=0
VAR=foo

Strict Source

Using the --strict-source flag has the same effect as defining a --strict flag for every variable defined in the source template.

$ export ANSWER='42'
$ dump-env -s template.env --strict-source
Missing env vars: TOKEN, VALUE

Creating secret variables in some CIs

Real-world usages

Projects that use this tool in production:

Related

You might also be interested in:

License

MIT

Comments
  • Source template variable restrictions

    Source template variable restrictions

    Related to #109 - allows a template file to act as the base list of included environment variables, and optionally enforce them all as strict requirements.

    See README.md changes for documentation.

    I've not used poetry before and was unable to get it running in my environment, so I was unable to run all of the steps in the contributing guide. Please forgive me :pray: I've done my best to match surrounding styles

    opened by leijou 6
  • --strict mode for all variables

    --strict mode for all variables

    Hello, first of all, thank you for all your great work, this utility clearly made my life easier :)

    Is there any way to use the --strict flag so it applies to all the env variables from the template?

    enhancement help wanted good first issue 
    opened by kekbait 6
  • Refactor `.travis.yml`

    Refactor `.travis.yml`

    We use Travis CI to test our code. We define all the configuration for this tool in this file: https://github.com/sobolevn/dump-env/blob/master/.travis.yml

    Currently it still uses tox and setup.py files to run tests. We need to switch to poetry.

    Things to do:

    1. remove setup.py
    2. remove tox.ini
    3. add pyhon3.5 to the supported versions here: https://github.com/sobolevn/dump-env/blob/master/pyproject.toml#L35
    4. run poetry lock to create pyproject.lock file
    5. refactor travis.yml, example: https://github.com/sobolevn/jinja2-git/blob/master/.travis.yml

    @tmsv please ask any questions you have

    enhancement help wanted 
    opened by sobolevn 6
  • Throw error if .env $VAR doesn't exists on environment

    Throw error if .env $VAR doesn't exists on environment

    Hello!

    First of all, thanks for this amazing lib.

    It's too much hard to develop a feature that we can pass an option like --var-not-found=error to throw error when one variable exists on env-template but doesn't exists on environment?

    I think this is a good feature to remember development team that they need add that var in CI tool and not only in .env/.env.template, thus it don't will pass on CI validation.

    Thank you!

    opened by murilo-campaner 5
  • Bump nitpick from 0.24.1 to 0.25.0

    Bump nitpick from 0.24.1 to 0.25.0

    Bumps nitpick from 0.24.1 to 0.25.0.

    Release notes

    Sourced from nitpick's releases.

    v0.25.0

    0.25.0 (2021-03-09)

    Features

    Changelog

    Sourced from nitpick's changelog.

    0.25.0 (2021-03-09)

    Features

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    If all status checks pass Dependabot will automatically merge this pull request.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 4
  • Bump pytest from 5.4.2 to 6.0.0

    Bump pytest from 5.4.2 to 6.0.0

    Bumps pytest from 5.4.2 to 6.0.0.

    Release notes

    Sourced from pytest's releases.

    6.0.0

    pytest 6.0.0 (2020-07-28)

    (Please see the full set of changes for this release also in the 6.0.0rc1 notes below)

    Breaking Changes

    • #5584: PytestDeprecationWarning are now errors by default.

      Following our plan to remove deprecated features with as little disruption as possible, all warnings of type PytestDeprecationWarning now generate errors instead of warning messages.

      The affected features will be effectively removed in pytest 6.1, so please consult the Deprecations and Removals section in the docs for directions on how to update existing code.

      In the pytest 6.0.X series, it is possible to change the errors back into warnings as a stopgap measure by adding this to your pytest.ini file:

      [pytest]
      filterwarnings =
          ignore::pytest.PytestDeprecationWarning
      

      But this will stop working when pytest 6.1 is released.

      If you have concerns about the removal of a specific feature, please add a comment to #5584.

    • #7472: The exec_() and is_true() methods of _pytest._code.Frame have been removed.

    Features

    • #7464: Added support for NO_COLOR and FORCE_COLOR environment variables to control colored output.

    Improvements

    • #7467: --log-file CLI option and log_file ini marker now create subdirectories if needed.
    • #7489: The pytest.raises function has a clearer error message when match equals the obtained string but is not a regex match. In this case it is suggested to escape the regex.

    Bug Fixes

    • #7392: Fix the reported location of tests skipped with @pytest.mark.skip when --runxfail is used.
    Changelog

    Sourced from pytest's changelog.

    Commits
    • 41a4539 Add link to 6.0.0rc1 changelog
    • 45ced1d Update doc/en/announce/release-6.0.0.rst
    • 1e4b8d4 Prepare release version 6.0.0
    • 3802982 Support generating major releases using issue comments (#7548)
    • c2c0b7a Merge pull request #7545 from asottile/pylib_in_docs
    • 9818899 remove usage of pylib in docs
    • 3a060b7 Revert change to traceback repr (#7535)
    • 7ec6401 Change pytest deprecation warnings into errors for 6.0 release (#7362)
    • a9799f0 Merge pull request #7531 from bluetech/changelog-mypy-version
    • 102360b Merge pull request #7519 from hroncok/pytest_warning_captured_deprecated
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 4
  • Move to poetry

    Move to poetry

    We need to replace current setup.py solution with poetry.

    Things to do:

    1. remove setup.py
    2. add pyproject.toml
    3. resolve dependencies to create pyproject.lock

    Here's an example of how it should be: https://github.com/wemake-services/wemake-python-styleguide

    Here's how to use it: https://github.com/wemake-services/wemake-python-styleguide/blob/master/CONTRIBUTING.md

    help wanted 
    opened by sobolevn 4
  • Bump pytest from 6.2.3 to 6.2.4

    Bump pytest from 6.2.3 to 6.2.4

    Bumps pytest from 6.2.3 to 6.2.4.

    Release notes

    Sourced from pytest's releases.

    6.2.4

    pytest 6.2.4 (2021-05-04)

    Bug Fixes

    • #8539: Fixed assertion rewriting on Python 3.10.
    Changelog

    Sourced from pytest's changelog.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    If all status checks pass Dependabot will automatically merge this pull request.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 3
  • Bump flake8-pytest-style from 1.4.0 to 1.4.1

    Bump flake8-pytest-style from 1.4.0 to 1.4.1

    Bumps flake8-pytest-style from 1.4.0 to 1.4.1.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    If all status checks pass Dependabot will automatically merge this pull request.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 3
  • Bump sphinx from 3.2.1 to 3.3.1

    Bump sphinx from 3.2.1 to 3.3.1

    Bumps sphinx from 3.2.1 to 3.3.1.

    Changelog

    Sourced from sphinx's changelog.

    Release 3.3.1 (released Nov 12, 2020)

    Bugs fixed

    • #8372: autodoc: autoclass directive became slower than Sphinx-3.2
    • #7727: autosummary: raise PycodeError when documenting python package without init.py
    • #8350: autosummary: autosummary_mock_imports causes slow down builds
    • #8364: C, properly initialize attributes in empty symbols.
    • #8399: i18n: Put system locale path after the paths specified by configuration

    Release 3.3.0 (released Nov 02, 2020)

    Deprecated

    • sphinx.builders.latex.LaTeXBuilder.usepackages
    • sphinx.builders.latex.LaTeXBuilder.usepackages_afger_hyperref
    • sphinx.ext.autodoc.SingledispatchFunctionDocumenter
    • sphinx.ext.autodoc.SingledispatchMethodDocumenter

    Features added

    • #8100: html: Show a better error message for failures on copying html_static_files
    • #8141: C: added a maxdepth option to :rst:dir:c:alias to insert nested declarations.
    • #8081: LaTeX: Allow to add LaTeX package via app.add_latex_package() until just before writing .tex file
    • #7996: manpage: Add :confval:man_make_section_directory to make a section directory on build man page
    • #8289: epub: Allow to suppress "duplicated ToC entry found" warnings from epub builder using :confval:suppress_warnings.
    • #8298: sphinx-quickstart: Add :option:sphinx-quickstart --no-sep option
    • #8304: sphinx.testing: Register public markers in sphinx.testing.fixtures
    • #8051: napoleon: use the obj role for all See Also items
    • #8050: napoleon: Apply :confval:napoleon_preprocess_types to every field
    • C and C++, show line numbers for previous declarations when duplicates are detected.
    • #8183: Remove substitution_reference nodes from doctree only on LaTeX builds

    Bugs fixed

    • #8085: i18n: Add support for having single text domain
    • #6640: i18n: Failed to override system message translation
    Commits
    • c09795c Bump to 3.3.1 final
    • 5cabdec Merge pull request #8412 from tk0miya/8164_autosummary_mock_imports_causes_sl...
    • 953a5ec Fix #8350: autosummary_mock_imports causes slow down builds
    • de2d2cc Update CHANGES for PR #8399
    • 52432c7 Merge pull request #8399 from mitya57/fix-system-translation-override
    • f92989c Put system locale path after the paths specified by configuration
    • 90f6fd9 Merge pull request #8390 from sphinx-doc/7727_autosummary_PycodeError
    • ed5af24 Merge branch '3.3.x' into 7727_autosummary_PycodeError
    • 0be0cd6 Merge pull request #8387 from tk0miya/8372_slow_autoclass
    • 787444f Fix #7727: autosummary raises PycodeError for namespace python package
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 3
  • Bump mypy from 0.761 to 0.770

    Bump mypy from 0.761 to 0.770

    Bumps mypy from 0.761 to 0.770.

    Commits
    • 92e3f39 Bump version to 0.770.
    • c4d8554 Support narrowing of walrus in most cases (#8458)
    • dc0d35f Revert "mypy: remove has_member (#8438)" (#8500)
    • 30c46ab Properly track module_hidden and module_public for incomplete symbols (#8450)
    • ef0b0df Use fully qualified names for ambiguous class names resembling builtins. (#8425)
    • d128158 Sync typeshed (#8448)
    • 09cdab4 mypy: remove has_member (#8438)
    • 7af3191 Make ModuleFinder try identifying non-PEP 561 packages (#8238)
    • 14ac8af [mypyc] Refactor methods into top-level functions in mypyc.genstatement (#8432)
    • ce24783 [mypyc] Refactor: extract builtin function specializers from genops (#8431)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 3
  • Computed env vars

    Computed env vars

    Hi there, I bumped into this project while having a look at tools that generate .env files.

    First of all thanks for your work on it as it nearly solves all our problems.

    There is one use case that we have here, related to connection strings: we basically compose the url from other vars in the environment, e.g.:

    DB_HOST=localhost
    DB_PORT=5432
    DB_USER=acuity_user
    DB_PASSWORD=INeedToBeMoreSecureThanThis!
    DB_NAME=appserver
    
    # The url is the only var appserver ever uses to connect to the DB
    DB_URL="jdbc:postgresql://${DB_HOST}:${DB_PORT}/${DB_NAME}?user=${DB_USER}&password=${DB_PASSWORD}!&ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory"
    

    At the moment dump-env does not replaces values in DB_URL. It would be nice if it did :smile:

    Thanks for reading :peace_symbol:

    opened by arichiardi 1
  • Multi-line support

    Multi-line support

    As per dotenv documentation, multi-line settings should be stored with escaped new line characters (i.e. \n).

    dump-env generates the .env file without honoring this escaping

    opened by micheledicosmo 1
Releases(1.4.0)
  • 1.4.0(Sep 23, 2022)

  • 1.3.0(Apr 12, 2021)

  • 1.2.0(Apr 29, 2020)

  • 1.1.1(Apr 29, 2020)

  • 1.1.0(Sep 8, 2019)

    Features

    • Adds --strict option to fail the command if some keys are not present

    Misc

    • Updates wemake-python-styleguide to the latest version
    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Jun 27, 2019)

    Breaking changes

    • Dropped python2 support

    Features

    • Adds multiple -p flags

    Misc

    • Updates dependencies
    • Enables dependabot
    • Improves testing and type checking
    • Improves docs
    • Adds CONTRIBUTING.md
    • Fixes sphinx and readthedocs builds
    Source code(tar.gz)
    Source code(zip)
  • 0.2.1(Apr 30, 2018)

    Features

    • Adds pyroma to check package metadata

    Bugfixes

    • Fixes pypi readme rendering by providing pypandoc
    • Changes how version are deployed from travis
    • wheel is now universal
    Source code(tar.gz)
    Source code(zip)
  • 0.2.0(Apr 30, 2018)

    Features

    • Refactors Env class to be a function
    • We are now using python3.5 for tests
    • We are now using md version of README file. New PyPI allows that!
    • Updates how linting works
    Source code(tar.gz)
    Source code(zip)
  • v0.1.1(Jan 15, 2018)

Attempts to crack the compression puzzle.

The Compression Puzzle One lovely Friday we were faced with this nice yet intriguing programming puzzle. One shall write a program that compresses str

Oto Brglez 14 Dec 29, 2022
ticktock is a minimalist library to view Python time performance of Python code.

ticktock is a minimalist library to view Python time performance of Python code.

Victor Benichoux 30 Sep 28, 2022
A tool written in python to generate basic repo files from github

A tool written in python to generate basic repo files from github

Riley 7 Dec 02, 2021
Nmap script to guess* a GitLab version.

gitlab-version-nse Nmap script to guess* a GitLab version. Usage https://github.com/righel/gitlab-version-nse cd gitlab-version-nse nmap target --s

Luciano Righetti 120 Dec 05, 2022
Control-Alt-Delete - Help Tux Escape Beastie's Jail!

Control-Alt-Delete Help Tux escape Beastie's jail by completing the following challenges! Challenges Challenge 00: Drinks: Tux needs to drink less. Ch

NDLUG 8 Oct 31, 2021
Aggregating gridded data (xarray) to polygons

A package to aggregate gridded data in xarray to polygons in geopandas using area-weighting from the relative area overlaps between pixels and polygons.

Kevin Schwarzwald 42 Nov 09, 2022
A functional standard library for Python.

Toolz A set of utility functions for iterators, functions, and dictionaries. See the PyToolz documentation at https://toolz.readthedocs.io LICENSE New

4.1k Dec 30, 2022
Skywater 130nm Klayout Device Generators PDK

Skywaters 130nm Technology for KLayout Device Generators Mabrains is excited to share with you our Device Generator Library for Skywater 130nm PDK. It

Mabrains 18 Dec 14, 2022
glip is a module for retrieve ip address like local-ip, global-ip, external-ip as string.

gle_ip_info glip is a module for retrieve ip address like local-ip, global-ip, external-ip as string.

Fatin Shadab 3 Nov 21, 2021
A fixture that allows runtime xfail

pytest-runtime-xfail pytest plugin, providing a runtime_xfail fixture, which is callable as runtime_xfail(), to allow runtime decisions to mark a test

Brian Okken 4 Apr 06, 2022
Multipurpose Growtopia Server tools, can be used for newbie to learn things.

Information Multipurpose Growtopia Server tools, can be used for newbie to learn things. Requirements - Python 3.x - Operating System (Recommended : W

Morphias 2 Oct 29, 2021
A random cats photos python module

A random cats photos python module

Fayas Noushad 6 Dec 01, 2021
A string extractor module for python

A string extractor module for python

Fayas Noushad 4 Jul 19, 2022
Conveniently measures the time of your loops, contexts and functions.

Conveniently measures the time of your loops, contexts and functions.

Maciej J Mikulski 79 Nov 15, 2022
Create a Web Component (a Custom Element) from a python file

wyc Create a Web Component (a Custom Element) from a python file (transpile python code to javascript (es2015)). Features Use python to define your cu

7 Oct 09, 2022
Python module and its web equivalent, to hide text within text by manipulating bits

cacherdutexte.github.io This project contains : Python modules (binary and decimal system 6) with a dedicated tkinter program to use it. A web version

2 Sep 04, 2022
A python mathematics module

A python mathematics module

Fayas Noushad 4 Nov 28, 2021
Implementing C++ Semantics in Python

Implementing C++ Semantics in Python

Tamir Bahar 7 May 18, 2022
Python code to remove empty folders from Windows/Android.

Empty Folder Cleaner is a program that deletes empty folders from your computer or device and removes clutter to improve performance. It supports only windows and android for now.

Dark Coder Cat | Vansh 4 Sep 27, 2022
Find unused resource keys in properties files in a Salesforce Commerce Cloud project and get rid of them.

Find Unused Resource Keys Find unused resource keys in properties files in a Salesforce Commerce Cloud project and get rid of them. It looks through a

Noël 5 Jan 08, 2022