write_session#

write_session(filepath, state, sections=None)[source]#

Write a session file in the indexed format.

Parameters:
filepathstr

Destination file path.

statedict

Session state dictionary to pickle.

sectionsdict, optional

Extra sections mapping names to (encoding, data) tuples. The "state" section is always written from state.