greatday.session module

Contains the GreatSession class.

class GreatSession(db_url, tag, *, name=None, verbose=0)[source]

Bases: potoroo._uow.UnitOfWork[greatday.repo.FileRepo]

Each time todos are opened in an editor, a new session is created.

Parameters
  • db_url (str) –

  • tag (GreatTag) –

  • name (Optional[str]) –

  • verbose (int) –

commit()[source]

Commit our changes.

Return type

None

property repo

Returns the GreatRepo object associated with this GreatSession.

Return type

FileRepo

rollback()[source]

Revert any changes made while in this GreatSession’s with-block.

Return type

None