Uqbar API


uqbar


uqbar.apis

Tools for auto-generating API documention.


Functions

collect_source_paths

source_path_to_package_path


uqbar.apis.builders


Classes

APIBuilder

A builder of reStructuredText API documentation for Python packages.


uqbar.apis.documenters


Classes

MemberDocumenter

Abstract base class for module member documenters.


Documenters

ClassDocumenter

A basic class documenter.

FunctionDocumenter

A basic function documenter.

ModuleDocumenter

A basic module documenter.

RootDocumenter

A basic root documenter.


uqbar.apis.dummy


Classes

MyChildClass

MyParentClass


uqbar.apis.graphs


Classes

InheritanceGraph

A builder of Graphviz inheritance graphs.


uqbar.apis.nodes


Internals

ModuleNode

A UniqueTreeNode subclass used during API construction to proxy modules.

PackageNode

A UniqueTreeList subclass used during API construction to proxy packages.


uqbar.apis.summarizers


Documenters

ImmaterialClassDocumenter

Class documenter that plays well with sphinx-immaterial theme.

ImmaterialModuleDocumenter

Module documenter that plays well with sphinx-immaterial theme.

SummarizingClassDocumenter

A summarizing class documenter.

SummarizingModuleDocumenter

A summarizing module documenter.

SummarizingRootDocumenter

A summarizing root documenter.


uqbar.book


uqbar.book.console


Classes

Console

Interactive console providing a sandboxed namespace for executing code examples.

ConsoleInput

ConsoleOutput

MonkeyPatch


Exceptions

ConsoleError


uqbar.book.extensions


Classes

Extension

GraphExtension


uqbar.book.sphinx


Classes

UqbarBookDefaultsDirective

UqbarBookDirective

UqbarBookImportDirective

uqbar_book_defaults_block

uqbar_book_import_block


Functions

black_format

collect_literal_blocks

console_context

create_cache_db

find_traceback

group_literal_blocks_by_cache_path

interpret_code_blocks

interpret_code_blocks_with_cache

interpret_import_block

interpret_literal_block

literal_block_to_cache_path

parse_rst

query_cache_db

rebuild_document

update_cache_db


uqbar.containers

Specialized container classes.


uqbar.containers.dependency_graph


Classes

DependencyGraph

A dependency graph of hashables.


uqbar.containers.unique_tree


Classes

UniqueTreeContainer

UniqueTreeDict

A dict-like node in a "unique" tree.

UniqueTreeList

A list-like node in a "unique" tree.

UniqueTreeNode

A node in a "unique" tree.

UniqueTreeSet

A set-like node in a "unique" tree.

UniqueTreeTuple

A tuple-like node in a "unique" tree.


uqbar.enums


Enumerations

IntEnumeration

Enumeration which behaves like an integer.

StrictEnumeration

Sortable enumeration which does not compare to objects not of its type.


Functions

from_expr


uqbar.ext


uqbar.ext.ipython


Functions

load_ipython_extension

patch_grapher


uqbar.graphs

Tools for building Graphviz graphs.


uqbar.graphs.attrs


Core Classes

Attributes

An attributes listing for a Graphviz graph, cluster, node or edge.


uqbar.graphs.core


Core Classes

Edge

A Graphviz edge.

Graph

A Graphviz graph, subgraph or cluster.

Node

A Graphviz node.


Mixins

Attachable


uqbar.graphs.graphers


Classes

Grapher


uqbar.graphs.html


HTML Classes

HRule

A Graphviz HTML horizontal rule.

LineBreak

A Graphviz HTML line break.

Table

A Graphviz HTML table.

TableCell

A Graphviz HTML table.

TableRow

A Graphviz HTML table row.

Text

A Graphviz HTML text node.

VRule

A Graphviz HTML vertical rule.


uqbar.graphs.records


Record Field Classes

RecordField

A Graphviz record field.

RecordGroup

A Graphviz record field group.


uqbar.io

Tools for IO and file-system manipulation.


Classes

DirectoryChange

A context manager for temporarily changing the current working directory.

Profiler

A context manager for profiling blocks of code.

RedirectedStreams

A context manager for capturing stdout and stderr output.

Timer

A context manager for timing blocks of code.


Functions

find_common_prefix

Find the common prefix of two or more paths.

find_executable

Finds executable name.

open_path

relative_to

Generates relative path from source_path to target_path.

walk

Walks a directory tree.

write

Writes contents to path.


uqbar.iterables


Functions

flatten

group_by_count

nwise

repeat_to_length

zip_cyclic


uqbar.objects


Functions

compare_objects

get_hash

get_repr

Build a repr string for expr from its vars and signature.

get_vars

Get args, var args and kwargs for an object expr.

new

Template an object.


uqbar.sphinx

Sphinx extensions.


uqbar.sphinx.api

Uqbar Sphinx API generation extension.


Functions

logger_func

on_builder_inited

Hooks into Sphinx's builder-inited event.

setup

Sets up Sphinx extension.


uqbar.sphinx.book

Uqbar Sphinx executable examples extension.


Functions

on_build_finished

Hooks into Sphinx's build-finished event.

on_builder_inited

Hooks into Sphinx's builder-inited event.

on_config_inited

Hooks into Sphinx's config-inited event.

on_doctree_read

Hooks into Sphinx's doctree-read event.

setup

Sets up Sphinx extension.

skip_node


uqbar.sphinx.inheritance

Uqbar Sphinx inheritance graph extension.


Classes

InheritanceDiagram

Runs when the inheritance_diagram directive is first encountered.

inheritance_diagram

A docutils node to use as a placeholder for the inheritance diagram.


Functions

build_urls

Builds a mapping of class paths to URLs.

html_visit_inheritance_diagram

Builds HTML output from an inheritance_diagram node.

latex_visit_inheritance_diagram

Builds LaTeX output from an inheritance_diagram node.

setup

Sets up Sphinx extension.

skip

Skip generating output, for non-supported builders.


uqbar.sphinx.style

Uqbar Sphinx styling extension.


Functions

depart_classifier

depart_definition

depart_term

handle_class

Styles autoclass entries.

handle_method

Styles automethod entries.

on_builder_inited

Hooks into Sphinx's builder-inited event.

on_doctree_read

Hooks into Sphinx's doctree-read event.

setup

Sets up Sphinx extension.

visit_classifier

visit_definition

visit_term


uqbar.strings

Tools for string manipulation.


Functions

ansi_escape

delimit_words

Delimit a string at word boundaries.

normalize

Normalizes whitespace.

to_dash_case

Convert a string to dash-delimited words.

to_snake_case

Convert a string to underscore-delimited words.