Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

149 lines (103 sloc) 3.723 kB

Internals

Overview

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

turses.cli

turses.config

turses.core

turses.meta

Decorators

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.

turses.models

Base model

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.

Twitter models

The Twitter entities represented on turses are the following:

turses.ui

Note

The list of widgets presented here is not complete.

Widget wrappers

turses make heavy usage of the urwid.WidgetWrap class to compose custom widgets.

:attr:`~turses.ui.ScrollableWidgetWrap` helps to make widgets that implement the :attr:`~turses.ui.Scrollable` interface, thus are navigable with the motion commands up, down, scroll_to_top and scroll_to_bottom.

Twitter Widgets

Here's a list with some of the widgets that represent Twitter entities:

Other widgets

turses.utils

Jump to Line
Something went wrong with that request. Please try again.