Skip to content

Commit

Permalink
.env.example with variables documentation (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
sblrok authored Oct 7, 2020
1 parent 4e0a2a5 commit 53e392a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# (optional) websockets URL to connect to hastic-server
HASTIC_SERVER_URL=ws://localhost:8002
# (optional) logging level: 'DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'
HS_AN_LOGGING_LEVEL=DEBUG
# (optional) time we wait for a response from hastic/analytics before sending the error
LEARNING_TIMEOUT=120
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ build/
dist/
*.spec
__pycache__/
test/
test/
.env
2 changes: 2 additions & 0 deletions analytics/config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import os
import json
from dotenv import load_dotenv

load_dotenv()

PARENT_FOLDER = os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
CONFIG_FILE = os.path.join(PARENT_FOLDER, 'config.json')
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ numpy==1.14.5
pandas==0.20.3
pyzmq==18.0.1
scipy==1.1.0
websockets==8.1
websockets==8.1
python-dotenv==0.14.0

0 comments on commit 53e392a

Please sign in to comment.