From 948499f63ec895fbd39ac45f2a89e1eb14add96e Mon Sep 17 00:00:00 2001 From: Mo8it Date: Mon, 18 Apr 2022 17:01:51 +0200 Subject: [PATCH] Add dotenv --- .env.template | 11 +++++++++++ .gitignore | 3 +++ poetry.lock | 17 ++++++++++++++++- pyproject.toml | 1 + 4 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .env.template diff --git a/.env.template b/.env.template new file mode 100644 index 0000000..57a6357 --- /dev/null +++ b/.env.template @@ -0,0 +1,11 @@ +# Do not share the secret key or the password salt! +SECRET_KEY= +SECURITY_PASSWORD_SALT= + +# Database +SQLALCHEMY_DATABASE_URI=sqlite:///../db/advLab.db + +# Server URL +SERVER_NAME= + +CHECK_EMAIL_DELIVERABILITY=True diff --git a/.gitignore b/.gitignore index 5d4c273..72ac7de 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# Do not commit the environment variables file with the secret key and password salt! +.env + # Python __pycache__ *.pyc diff --git a/poetry.lock b/poetry.lock index f50c419..857a195 100644 --- a/poetry.lock +++ b/poetry.lock @@ -335,6 +335,17 @@ python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" [package.dependencies] six = ">=1.5" +[[package]] +name = "python-dotenv" +version = "0.20.0" +description = "Read key-value pairs from a .env file and set them as environment variables" +category = "main" +optional = false +python-versions = ">=3.5" + +[package.extras] +cli = ["click (>=5.0)"] + [[package]] name = "setuptools-scm" version = "6.4.2" @@ -427,7 +438,7 @@ email = ["email-validator"] [metadata] lock-version = "1.1" python-versions = "^3.10" -content-hash = "3d265c460b99f7274132c731168574a22d37878555ade44cd64d3c8c9529fb8a" +content-hash = "0863c01d51cfebde7628e9643fc05470ebb1f9d0e6d0db9f40867d65b172197b" [metadata.files] blinker = [ @@ -754,6 +765,10 @@ python-dateutil = [ {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, ] +python-dotenv = [ + {file = "python-dotenv-0.20.0.tar.gz", hash = "sha256:b7e3b04a59693c42c36f9ab1cc2acc46fa5df8c78e178fc33a8d4cd05c8d498f"}, + {file = "python_dotenv-0.20.0-py3-none-any.whl", hash = "sha256:d92a187be61fe482e4fd675b6d52200e7be63a12b724abbf931a40ce4fa92938"}, +] setuptools-scm = [ {file = "setuptools_scm-6.4.2-py3-none-any.whl", hash = "sha256:acea13255093849de7ccb11af9e1fb8bde7067783450cee9ef7a93139bddf6d4"}, {file = "setuptools_scm-6.4.2.tar.gz", hash = "sha256:6833ac65c6ed9711a4d5d2266f8024cfa07c533a0e55f4c12f6eff280a5a9e30"}, diff --git a/pyproject.toml b/pyproject.toml index f9e1567..0d10c74 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,6 +14,7 @@ Flask-Security-Too = ">=4.1.3" Flask-Admin = ">=1.6.0" matplotlib = ">=3.5.1" numpy = ">=1.22.3" +python-dotenv = ">=0.20.0" [tool.poetry.dev-dependencies]