All interactions with the Ledger library take place in the context of a @var{Session}.  You may create as many sessions as you like, though typically only one is needed during the lifetime of a script{\SCRV_FN=An example where more might be needed is a GUI program that opens multiple Ledger files in different windows, and creates reports for each file separately\END_SCRV_FN}.  Ledger provides a pre-initialized session named @var{session}, but others can still be created.  Creating a session is trivial, but before it may be used it must be passed in a call to @code{set_session_context}.  This is how multiple sessions are managed in a multi-threaded environment, where the session itself should be considered non-reentrant.

The first operation after creating a session is typically to load the Ledger data you wish to report on for that session.  The loaded data can be reset at any time, and can also be modified.