From fc1f1c25218f9bc2bd31ebb9575a065e77a0187a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Leniec?= Date: Wed, 6 May 2020 23:09:21 +0200 Subject: [PATCH] Add .env (#36) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: MichaƂ --- .env.example | 2 ++ main.py | 4 ++++ requirements.txt | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..03f620a --- /dev/null +++ b/.env.example @@ -0,0 +1,2 @@ +PYPACKET_USERNAME= +PYPACKET_PASSWORD= \ No newline at end of file diff --git a/main.py b/main.py index df9b3f1..60962c0 100755 --- a/main.py +++ b/main.py @@ -7,6 +7,7 @@ from pypacket.base.deserialization import Deserialization from pypacket.base.configuration import Configuration from pypacket.util.colors import Colors +from dotenv import load_dotenv print(Colors.GREEN + """ ___ ___ _ _ @@ -16,6 +17,9 @@ |__/ """ + Colors.RESET) +# Load envs +load_dotenv() + # Configure logging. log_handler = Logger() diff --git a/requirements.txt b/requirements.txt index bd0b620..4235c2c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,5 @@ aprslib==0.6.47 coveralls==2.0.0 pytest==5.4.1 pytest-cov==2.8.1 -terminaltables==3.1.0 \ No newline at end of file +terminaltables==3.1.0 +python-dotenv==0.13.0 \ No newline at end of file