MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / EsiSettings

Class EsiSettings

service/settings.py:354–396  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

352
353
354class EsiSettings:
355 _instance = None
356
357 @classmethod
358 def getInstance(cls):
359 if cls._instance is None:
360 cls._instance = EsiSettings()
361
362 return cls._instance
363
364 def __init__(self):
365 # SSO Mode:
366 # 0 - pyfa.io
367 # 1 - custom application
368 # LoginMode:
369 # 0 - Server Start Up
370 # 1 - User copy and paste data from website to pyfa
371 defaults = {
372 "ssoMode": 0,
373 "loginMode": 0,
374 "clientID": "",
375 "clientSecret": "",
376 "timeout": 60,
377 "server": "Tranquility",
378 "exportCharges": True,
379 "exportImplants": True,
380 "exportBoosters": True,
381 "enforceJwtExpiration": True
382 }
383
384 self.settings = SettingsProvider.getInstance().getSettings(
385 "pyfaServiceEsiSettings",
386 defaults
387 )
388
389 def get(self, type):
390 return self.settings[type]
391
392 def set(self, type, value):
393 self.settings[type] = value
394
395 def keys(self):
396 return config.supported_servers.keys()
397
398
399class StatViewSettings:

Callers 1

getInstanceMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected