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)

Customized python validations.

A customized python validations.

Wilfred V. Pine 2 Apr 20, 2022
This two python programs can convert km to miles and miles to km

km-to-miles These two little python programs can convert kilometers to miles and miles to kilometers Needed Python3 or a online python compiler with t

Chandula Janith 3 Jan 30, 2022
A python package containing all the basic functions and classes for python. From simple addition to advanced file encryption.

A python package containing all the basic functions and classes for python. From simple addition to advanced file encryption.

PyBash 11 May 22, 2022
Python Classes Without Boilerplate

attrs is the Python package that will bring back the joy of writing classes by relieving you from the drudgery of implementing object protocols (aka d

The attrs Cabal 4.6k Jan 06, 2023
Create password - Generate Random Password with Passphrase

Generate Random Password with Passphrase This is a python code to generate stron

1 Jan 18, 2022
Similar looking domain detection using python fuzzywuzzy

Major cause of phishing and BEC incident is similar looking domain, if you detect it early, you can prevent incidents early, python fuzzywuzzy module let you do that

2 Nov 07, 2021
Astvuln is a simple AST scanner which recursively scans a directory, parses each file as AST and runs specified method.

Astvuln Astvuln is a simple AST scanner which recursively scans a directory, parses each file as AST and runs specified method. Some search methods ar

Bitstamp Security 7 May 29, 2022
A time table app to notify the user about their class timings

kivyTimeTable A time table app to notify the user about their class timings Features This project incorporates some features i wanted to see in a time

2 Dec 15, 2021
Abstraction of a Unit, includes convertions and basic operations.

Units Abstraction of a Unit, includes convertions and basic operations. ------ EXAMPLE : Free Fall (No air resistance) ------- from units_test import

1 Dec 23, 2021
🚧Useful shortcuts for simple task on windows

Windows Manager A tool containg useful utilities for performing simple shortcut tasks on Windows 10 OS. Features Lit Up - Turns up screen brightness t

Olawale Oyeyipo 0 Mar 24, 2022
A collection of custom scripts for working with Quake assets.

Custom Quake Tools A collection of custom scripts for working with Quake assets. Features Script to list all BSP files in a Quake mod

Jason Brownlee 3 Jul 05, 2022
Small Python script to parse endlessh's output and print some neat statistics

endlessh_parser endlessh_parser is a small Python script that parses endlessh's output and prints some neat statistics about it Usage Install all the

ManicRobot 1 Oct 18, 2021
This code renames subtitle file names to your video files names, so you don't need to rename them manually.

Rename Subtitle This code renames your subtitle file names to your video file names so you don't need to do it manually Note: It only works for series

Mostafa Kazemi 4 Sep 12, 2021
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
Kanye West Lyrics Generator

aikanye Kanye West Lyrics Generator Python script for generating Kanye West lyrics Put kanye.txt in the same folder as the python script and run "pyth

4 Jan 21, 2022
A small utility that sorts your files.

FileSorter A small utility that sorts your files. TODO: Scan directory to find files(thanks @corruptmemry for this!) Split extensions to determine fil

2 Jun 16, 2022
A fancy and practical functional tools

Funcy A collection of fancy functional tools focused on practicality. Inspired by clojure, underscore and my own abstractions. Keep reading to get an

Alexander Schepanovski 2.9k Jan 07, 2023
A Python package for floating-point binary fractions. Do math in base 2!

An implementation of a floating-point binary fractions class and module in Python. Work with binary fractions and binary floats with ease!

10 Oct 29, 2022
Early version for manipulate Geo localization data trough API REST.

Backend para obtener los datos (beta) Descripción El servidor está diseñado para recibir y almacenar datos enviados en forma de JSON por una aplicació

Víctor Omar Vento Hernández 1 Nov 14, 2021
A script to parse and display buy_tag and sell_reason for freqtrade backtesting trades

freqtrade-buyreasons A script to parse and display buy_tag and sell_reason for freqtrade backtesting trades Usage Copy the buy_reasons.py script into

Robert Davey 31 Jan 01, 2023