Skip to content

Commit df8febb

Browse files
authored
Update script.py
1 parent 3072b53 commit df8febb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scripts/PagerDuty-Integration/script.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22

33
import json
44
import requests
5+
from pathlib import Path
6+
from dotenv import load_dotenv
7+
env_path=Path('.')/'.env'
8+
load_dotenv(dotenv_path=env_path)
9+
510

611
#This Key should be available in .env file
7-
ROUTING_KEY = "" # ENTER EVENTS V2 API INTEGRATION KEY HERE
12+
ROUTING_KEY = os.environ['ROUTING_KEY'] # ENTER EVENTS V2 API INTEGRATION KEY HERE
813

914

1015
# This function takes the payload info from the user and can be put in the right format

0 commit comments

Comments
 (0)