MCPcopy
hub / github.com/CryptoSignal/Crypto-Signal / main

Function main

app/app.py:17–41  ·  view source on GitHub ↗

Initializes the application

()

Source from the content-addressed store, hash-verified

15from behaviour import Behaviour
16
17def main():
18 """Initializes the application
19 """
20 # Load settings and create the config object
21 config = Configuration()
22 settings = config.settings
23
24 # Set up logger
25 logs.configure_logging(settings['log_level'], settings['log_mode'])
26 logger = structlog.get_logger()
27
28 # Configure and run configured behaviour.
29 exchange_interface = ExchangeInterface(config.exchanges)
30 notifier = Notifier(config.notifiers)
31
32 behaviour = Behaviour(
33 config,
34 exchange_interface,
35 notifier
36 )
37
38 while True:
39 behaviour.run(settings['market_pairs'], settings['output_mode'])
40 logger.info("Sleeping for %s seconds", settings['update_interval'])
41 time.sleep(settings['update_interval'])
42
43if __name__ == "__main__":
44 try:

Callers 1

app.pyFile · 0.85

Calls 5

runMethod · 0.95
ConfigurationClass · 0.90
ExchangeInterfaceClass · 0.90
NotifierClass · 0.90
BehaviourClass · 0.90

Tested by

no test coverage detected