Could somebody explain the difference between a qi.Session and qi.Application?
I have read the API, but I have been unable to find a detailed answer to my question listed above.
Could somebody explain the difference between a qi.Session and qi.Application?
I have read the API, but I have been unable to find a detailed answer to my question listed above.
qi.Session
is relatively "low level", and can be used as a service directory of sorts. To use it, you need to explicitly pass the URL and port, and connect it.
qi.Application
is specifically for running Python scripts/services, and will internally create a qi.Session object with the right parameters based on what has been passed by command line (tho you can also create them explicitly when creating the Application object). You can think of it as a wrapper that sets the session up for you.
Most of the time you'll be manipulated sessions (you can also get one inside choregraphe), the application is only relevant when your top-level script/service is starting or ending.