Skip to main content

Strip secrets from .env files

Project description

:see_no_evil: dotenv-stripout

An easily-installable git filter which hides your projects' sensitive data, while maximising collaboration and reproducibility.

It's like nbstripout for your .env files.

Eg. your local .env looks like this

MY_SECRET_USERNAME=something-very-secret
MY_SECRET_PASSWORD=IqLTLrFviwHTDKWGZoR7uB2JtM1wjwE34MBwoztE

but your .env on GitHub looks like this

MY_SECRET_USERNAME=
MY_SECRET_PASSWORD=

If you want to know more, I've written a blog post about how and why I created this package.

Installation & Use

First, install the python package which does the stripping and manages the git filter.

pip install dotenv-stripout

Then, to install the filter in the current repo, run

dotenv-stripout install

To remove the filter from the current repo, run

dotenv-stripout uninstall

You can check whether the filter is installed in a repo by running

dotenv-stripout status

Adding the --global flag to any command will point them to your global git config instead, with the installed filter applying to commits in any repo.

You can also use the CLI to strip your actual working .env files in the current repo. Just run

dotenv-stripout

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dotenv-stripout-0.1.3.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dotenv_stripout-0.1.3-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file dotenv-stripout-0.1.3.tar.gz.

File metadata

  • Download URL: dotenv-stripout-0.1.3.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.2

File hashes

Hashes for dotenv-stripout-0.1.3.tar.gz
Algorithm Hash digest
SHA256 8e121f541ea9ba476cf2b4743b6c959475cc3aa36157ee8340eda1abccef33d6
MD5 602a541d536985d5df94f2d8cb94cd23
BLAKE2b-256 3b662297878ecdddd9ed7f7f25e5d79fc7670a5096456ede6e4ee271bd778a88

See more details on using hashes here.

File details

Details for the file dotenv_stripout-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for dotenv_stripout-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bf7e294ce9e43e4e9ad4fc2816e54bc782ef36a2aaccdcec99f47cfd2dbdb3c2
MD5 99920a56f19e8ffbb38cc41468b4e279
BLAKE2b-256 4daf25eb9b6e19cd348f21f67c02b1256363efb63fd8aec9076c4118b290fc80

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page