Here is an overview of the multiple files that compound turses, each of them with a comment explaining their goal.
turses ├── requirements │ ├── base.txt │ └── dev.txt ├── setup.py └── turses ├── api │ ├── base.py # definition of an interface to the Twitter API │ ├── backends.py # Twitter API implementations │ ├── debug.py # mock API implementation for debugging │ └── __init__.py ├── cli.py # logic for launching `turses` ├── config.py # configuration management ├── core.py # core logic: controller and event handling ├── __init__.py ├── meta.py # decorators and abstract base classes ├── models.py # data structures ├── ui.py # UI widgets └── utils.py # misc funcions that don't fit elsewhere
Abstract base classes
The abstract base classes can be understood as interfaces; they define a set of methods and properties that their subclasses must implement. They provide very general pieces of functionality.
The model on which
turses is based is :attr:`~turses.models.TimelineList`,
a list of :attr:`~turses.models.Timeline` objects. This model is mapped into
the list of buffers that appear on the user interface.
The Twitter entities represented on
turses are the following:
The list of widgets presented here is not complete.
turses make heavy usage of the
urwid.WidgetWrap class to compose custom
:attr:`~turses.ui.ScrollableWidgetWrap` helps to make widgets that
implement the :attr:`~turses.ui.Scrollable` interface, thus are navigable with
the motion commands
Here's a list with some of the widgets that represent Twitter entities: