Pranay25 commited on
Commit
551c316
·
verified ·
1 Parent(s): cc217d5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -24,10 +24,11 @@ GENDER_MAPPING = {
24
  "Other": "Others"
25
  }
26
 
27
- # Salesforce credentials from environment variables
28
- SALESFORCE_USERNAME = os.getenv("SALESFORCE_USERNAME", "sathkruthatech@hms.com")
29
- SALESFORCE_PASSWORD = os.getenv("SALESFORCE_PASSWORD", "Hms@2025")
30
- SALESFORCE_SECURITY_TOKEN = os.getenv("SALESFORCE_SECURITY_TOKEN", "jcZQm9DJC8F2ne7o2iWU32ciB")
 
31
 
32
  # Log the credentials being used (for debugging)
33
  print(f"Using Salesforce credentials - Username: {SALESFORCE_USERNAME}")
@@ -86,7 +87,7 @@ def interact_with_salesforce(attributes):
86
  username=SALESFORCE_USERNAME,
87
  password=SALESFORCE_PASSWORD,
88
  security_token=SALESFORCE_SECURITY_TOKEN,
89
- domain="login",
90
  version="60.0"
91
  )
92
  print(f"Successfully connected to Salesforce as {SALESFORCE_USERNAME}")
@@ -189,4 +190,4 @@ def app():
189
  return demo
190
 
191
  if __name__ == "__main__":
192
- app().launch(share=True)
 
24
  "Other": "Others"
25
  }
26
 
27
+ # Hardcoded Salesforce credentials
28
+ SALESFORCE_USERNAME = "sathkruthatech@hms.com"
29
+ SALESFORCE_PASSWORD = "Hms@2025"
30
+ SALESFORCE_SECURITY_TOKEN = "jcZQm9DJC8F2ne7o2iWU32ciB"
31
+ SALESFORCE_DOMAIN = "login" # Change to "test" if using sandbox environment
32
 
33
  # Log the credentials being used (for debugging)
34
  print(f"Using Salesforce credentials - Username: {SALESFORCE_USERNAME}")
 
87
  username=SALESFORCE_USERNAME,
88
  password=SALESFORCE_PASSWORD,
89
  security_token=SALESFORCE_SECURITY_TOKEN,
90
+ domain=SALESFORCE_DOMAIN,
91
  version="60.0"
92
  )
93
  print(f"Successfully connected to Salesforce as {SALESFORCE_USERNAME}")
 
190
  return demo
191
 
192
  if __name__ == "__main__":
193
+ app().launch(share=True)